Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291153

Change error reporting to suppress PHP 5.4 Strict Warnings, with 5.3 backward compatibility

$
0
0

My company has recently tried patch all our Drupal 6 sites to be compatible with PHP 5.4

As E_STRICT has now become part of E_ALL we were receiving a lot of strict warnings, mostly for Views.

In order to circumvent this we conditionally removed E_STRICT from E_ALL in PHP 5.4 and higher. Additionally we also removed E_NOTICE in the patch as PHP 5.4 is now far more aggressive about NOTICES.

If we had to do this for PHP versions less than 5.4 then we would start to get other notices because in versions less than 5.4 E_ALL did not include E_STRICT and there for we would be setting error reporting to a different value compared to 5.4.

So we are doing a version check and set error reporting to the appropriate value. In this way are making sure the error reporting value does not differ from PHP version 5.3 to 5.4.

AttachmentSizeStatusTest resultOperations
common.inc_.patch891 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch common.inc__2.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

Viewing all articles
Browse latest Browse all 291153

Trending Articles