Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fails Strict Standards - Multiple Errors #48

volomike opened this Issue Dec 18, 2009 · 3 comments


None yet
2 participants

On the 1.2.1 release, I turned on strict standards error reporting before using Simple Pie using this:


While running, I received perhaps a hundred errors regarding:

  • Assigning the return value of new by reference is deprecated. (In other words, drop the =& new stuff.)
  • Non-static method SimplePie_Misc::[method went here] should not be called statically. (In other words, use $this-> instead.)
  • It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead. (Self explanatory. Follow the error's instructions.)
  • is_a(): Deprecated. Please use the instanceof operator. (Self explanatory. Follow the error's instructions.)

I have uploaded a fix to the 1.2.1 release here to fix these problems. As for the date issue, it is resolved if you do this code before instantiating SimplePie:

$sTZ = @ date('T');
try {
    if (function_exists('date_default_timezone_set')) {
    else {
        putenv('TZ=' . $sTZ);
    ini_set('date.timezone', $sTZ);
} catch(Exception $__e) {}

The @ line above can be replaced with your timezone setting (hard-coding it) if you prefer that instead.

Here's the patched version I have for you to consider:



rmccue commented Dec 22, 2009

The 1.2.* releases are PHP 4 compatible, and as such, can't be E_STRICT compliant. Try the 1.3 branch, or Skyzyx's branch (both should be the same).


rmccue commented Feb 18, 2010

This appears to be fixed now.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment