PHP Notice Fixes
-
The plugin causes a handful of PHP notices that can be easily fixed.
Line 43 returns an index undefined error.
PHP Notice: Undefined index: page in /var/www/html/wp-content/plugins/zopim-live-chat/zopim.php on line 43
You can fix it by replacing it with this code:
if ( ( $code == "" || $code == "zopim" ) && ( isset( $_GET['page'] ) && ! preg_match( "/zopim/", $_GET['page'] ) ) && ( isset( $_GET['page'] ) && ! preg_match( "/zopim/", $_SERVER["SERVER_NAME"] ) ) ) return;
Line 77 also throws a notice, because the variable does not exist yet, and you are performing a .= operation.
You can fix it by replacing line 77 with the following:
$zopim_embed_opts = "\$zopim( function() {";
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘PHP Notice Fixes’ is closed to new replies.