This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixes for PHP 5.3.1

  • Loading branch information...
lastcraft
lastcraft committed Mar 23, 2010
1 parent f24efb8 commit 63c7dc898f952ee16656871d685c74d3d7cd05da
Showing with 12 additions and 2 deletions.
  1. +11 −1 errors.php
  2. +1 −1 test/interfaces_test.php
View
@@ -232,7 +232,7 @@ function SimpleTestErrorHandler($severity, $message, $filename = null, $line = n
$severity = $severity & error_reporting();
if ($severity) {
restore_error_handler();
- if (IsNotCausedBySimpleTest($message)) {
+ if (IsNotCausedBySimpleTest($message) && IsNotTimeZoneNag($message)) {
if (ini_get('log_errors')) {
$label = SimpleErrorQueue::getSeverityAsString($severity);
error_log("$label: $message in $filename on line $line");
@@ -254,4 +254,14 @@ function SimpleTestErrorHandler($severity, $message, $filename = null, $line = n
function IsNotCausedBySimpleTest($message) {
return ! preg_match('/returned by reference/', $message);
}
+
+/**
+ * Certain messages caused by PHP are just noise.
+ * These have to be filtered.
+ * @param string $message Message to filter.
+ * @return boolean True if genuine failure.
+ */
+function IsNotTimeZoneNag($message) {
+ return ! preg_match('/not safe to rely .* timezone settings/', $message);
+}
?>
View
@@ -50,7 +50,7 @@ function testCanMockAllSplClasses() {
return;
}
foreach(spl_classes() as $class) {
- if ($class == 'SplHeap') {
+ if ($class == 'SplHeap' or $class = 'SplFileObject') {
continue;
}
if (version_compare(PHP_VERSION, '5.1', '<') &&

0 comments on commit 63c7dc8

Please sign in to comment.