Browse Source

Merge branch 'PHP-5.3' of https://git.php.net/repository/php-src into PHP-5.3

* 'PHP-5.3' of https://git.php.net/repository/php-src:
  Correct the test summary
  Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo)
  Avoid calling select if maxfd returned by curl_multi_fdset is -1
  Fixed bug #63111 (is_callable() lies for abstract static method)
  updated lib versions
PHP-5.3.19
Christopher Jones 14 years ago
parent
commit
bf50416744
  1. 1
      NEWS
  2. 36
      Zend/tests/bug63111.phpt
  3. 9
      Zend/zend_API.c
  4. 3
      ext/curl/multi.c
  5. 19
      ext/standard/tests/general_functions/bug60723.phpt
  6. 10
      main/main.c
  7. 6
      win32/build/libs_version.txt

1
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

36
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

9
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) {

3
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));
}
/* }}} */

19
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

10
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);

6
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

Loading…
Cancel
Save