Strict standards - Deprecation warnings causing script errors

42 views
Skip to first unread message

Matthew O'Riordan

unread,
Dec 6, 2009, 11:08:23 AM12/6/09
to GAD Wordpress Plugin
Hi there

On my dev server, deprecation warnings are turned on, however within
Wordpress it turns those warnings off automatically.

However, your script library gadmain.js.php does not turn off these
warnings which causes the following to be inserted at the top of
gadmain.js.php and cause script errors because of issues with wp-
config.php:

<br />
<b>Strict Standards</b>: Assigning the return value of new by
reference is deprecated in <b>/Users/matthew/Projects/
lemonstudioslondon.com/www/wp-settings.php</b> on line <b>601</b><br /
>
<br />
<b>Strict Standards</b>: Assigning the return value of new by
reference is deprecated in <b>/Users/matthew/Projects/
lemonstudioslondon.com/www/wp-settings.php</b> on line <b>616</b><br /
>
<br />

<b>Strict Standards</b>: Assigning the return value of new by
reference is deprecated in <b>/Users/matthew/Projects/
lemonstudioslondon.com/www/wp-settings.php</b> on line <b>623</b><br /
>
<br />
<b>Strict Standards</b>: Assigning the return value of new by
reference is deprecated in <b>/Users/matthew/Projects/
lemonstudioslondon.com/www/wp-settings.php</b> on line <b>630</b><br /
>
<br />
<b>Strict Standards</b>: Assigning the return value of new by
reference is deprecated in <b>/Users/matthew/Projects/
lemonstudioslondon.com/www/wp-settings.php</b> on line <b>666</b><br /
>


What I have done to fix this is add the following lines to the top and
bottom of gadmain.js.php respectively:

Add to top within <?php tags>
$current_error_reporting = error_reporting();
error_reporting ($current_error_reporting & ~E_STRICT);

Add to bottom:
<?php error_reporting($current_error_reporting); ?>

Hope that helps anyone else with the same problem, and perhaps that or
a similar fix can be introduced into future versions (I know it's a WP
issue work around, but still, not one that will go away quickly).

THanks,
Matthew O'Riordan
http://mattheworiordan.com/

Carson

unread,
Dec 6, 2009, 1:59:27 PM12/6/09
to GAD Wordpress Plugin
Thanks for the heads up. I'm adding it to the next version to fix.

Carson

On Dec 6, 11:08 am, "Matthew O'Riordan" <matthew.orior...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages