WP_DEBUG and plugin's PHP errors
-
Hi!
I’m setting the WP_DEBUG variable to true on my development environment.
I noticed that WP YouTube Lyte creates a few warnings:
Warning: Illegal string offset 'title' in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311 Notice: Uninitialized string offset: 0 in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311 Warning: Illegal string offset 'title' in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311 Notice: Uninitialized string offset: 0 in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311 Warning: Illegal string offset 'title' in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311 Notice: Uninitialized string offset: 0 in /path/to/wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php on line 311Line 311 is the following:
$lytetemplate = $wrapper."<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\"><div id=\"lyte_".$vid."\" data-src=\"".$thumbUrl."\" class=\"pL\"><div class=\"tC".$titleClass."\"><div class=\"tT\">".$yt_resp_array["title"]."</div></div><div class=\"play\"></div><div class=\"ctrl\"><div class=\"Lctrl\"></div><div class=\"Rctrl\"></div></div></div>".$noscript."</div></div>".$lytelinks_txt;I temporarily fixed it by replacing line 311 with these:
$lytetemplate = $wrapper."<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\"><div id=\"lyte_".$vid."\" data-src=\"".$thumbUrl."\" class=\"pL\">"; if (isset($yt_resp_array) && !empty($yt_resp_array) && $yt_resp_array["title"] != NULL) : $lytetemplate .= "<div class=\"tC".$titleClass."\"><div class=\"tT\">".$yt_resp_array['title']."</div></div>"; endif; $lytetemplate .= "<div class=\"play\"></div><div class=\"ctrl\"><div class=\"Lctrl\"></div><div class=\"Rctrl\"></div></div></div>".$noscript."</div></div>".$lytelinks_txt;And yes, I know this will be overwritten with the next plugin’s update, but let’s hope it will be fixed by then 🙂
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘WP_DEBUG and plugin's PHP errors’ is closed to new replies.