summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--Zend/tests/bug63111.phpt36
-rw-r--r--Zend/zend_API.c9
-rw-r--r--ext/curl/multi.c3
-rw-r--r--ext/standard/tests/general_functions/bug60723.phpt19
-rw-r--r--main/main.c10
-rw-r--r--win32/build/libs_version.txt6
7 files changed, 79 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 787d76d720..191264b614 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP NEWS
?? ??? 2012, PHP 5.3.18
- Core:
+ . Fixed bug #63111 (is_callable() lies for abstract static method). (Dmitry)
. Fixed bug #63093 (Segfault while load extension failed in zts-build).
(Laruence)
. Fixed bug #62976 (Notice: could not be converted to int when comparing
diff --git a/Zend/tests/bug63111.phpt b/Zend/tests/bug63111.phpt
new file mode 100644
index 0000000000..3f19068668
--- /dev/null
+++ b/Zend/tests/bug63111.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #63111 (is_callable() lies for abstract static method)
+--FILE--
+<?php
+abstract class Foo {
+ abstract static function bar();
+}
+interface MyInterface {
+ static function bar();
+}
+abstract class Bar {
+ static function foo() {
+ echo "ok\n";
+ }
+}
+var_dump(is_callable(array("Foo", "bar")));
+var_dump(is_callable("Foo::bar"));
+var_dump(is_callable(array("MyInterface", "bar")));
+var_dump(is_callable("MyInterface::bar"));
+var_dump(is_callable(array("Bar", "foo")));
+var_dump(is_callable("Bar::foo"));
+Bar::foo();
+Foo::bar();
+?>
+--EXPECTF--
+Strict Standards: Static function Foo::bar() should not be abstract in %sbug63111.php on line 3
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+ok
+
+Fatal error: Cannot call abstract method Foo::bar() in %sbug63111.php on line 20
+
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index cf96743ee2..d529775764 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2603,7 +2603,14 @@ get_function_via_handler:
if (retval) {
if (fcc->calling_scope && !call_via_handler) {
- if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) {
+ if (!fcc->object_ptr && (fcc->function_handler->common.fn_flags & ZEND_ACC_ABSTRACT)) {
+ if (error) {
+ zend_spprintf(error, 0, "cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ retval = 0;
+ } else {
+ zend_error(E_ERROR, "Cannot call abstract method %s::%s()", fcc->calling_scope->name, fcc->function_handler->common.function_name);
+ }
+ } else if (!fcc->object_ptr && !(fcc->function_handler->common.fn_flags & ZEND_ACC_STATIC)) {
int severity;
char *verb;
if (fcc->function_handler->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 034aa65c28..53e97b80f8 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -191,6 +191,9 @@ PHP_FUNCTION(curl_multi_select)
FD_ZERO(&exceptfds);
curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd);
+ if (maxfd == -1) {
+ RETURN_LONG(-1);
+ }
RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
}
/* }}} */
diff --git a/ext/standard/tests/general_functions/bug60723.phpt b/ext/standard/tests/general_functions/bug60723.phpt
new file mode 100644
index 0000000000..07b801bcfe
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug60723.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #60723 (error_log error time has changed to UTC ignoring default timezo)
+--INI--
+date.timezone=ASIA/Chongqing
+log_errors=On
+--FILE--
+<?php
+$dir = dirname(__FILE__);
+$log = $dir . "/tmp.err";
+ini_set("error_log", $log);
+echo $aa;
+error_log("dummy");
+readfile($log);
+unlink($log);
+?>
+--EXPECTF--
+Notice: Undefined variable: aa in %sbug60723.php on line %d
+[%s ASIA/Chongqing] PHP Notice: Undefined variable: aa in %sbug60723.php on line %d
+[%s ASIA/Chongqing] dummy
diff --git a/main/main.c b/main/main.c
index 6506e10af6..631a6a9fea 100644
--- a/main/main.c
+++ b/main/main.c
@@ -600,7 +600,15 @@ PHPAPI void php_log_err(char *log_message TSRMLS_DC)
char *error_time_str;
time(&error_time);
- error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC);
+#ifdef ZTS
+ if (!php_during_module_startup()) {
+ error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC);
+ } else {
+ error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 0 TSRMLS_CC);
+ }
+#else
+ error_time_str = php_format_date("d-M-Y H:i:s e", 13, error_time, 1 TSRMLS_CC);
+#endif
len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL);
#ifdef PHP_WIN32
php_flock(fd, 2);
diff --git a/win32/build/libs_version.txt b/win32/build/libs_version.txt
index 2640fd5c5b..5895e7bc9d 100644
--- a/win32/build/libs_version.txt
+++ b/win32/build/libs_version.txt
@@ -1,15 +1,15 @@
bz2-1.0.6
cclient-2007e
freetype-2.4.3
-icu-4.6.1
+icu-49.1.2
jpeglib-6b
-libcurl-7.24.0
+libcurl-7.27.0
libiconv-1.14
libmcrypt-2.5.8
libmpir-1.3.1
libpng-1.2.46
libpq-8.3.6
-libssh2-1.3.0
+libssh2-1.4.2
libtidy-20090325
libxslt-1.1.27
libxml-2.7.8