requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
+- Fixed bug #51791 (constant() aborts execution when fail to check undefined
+ constant). (Felipe)
- Fixed bug #51732 (Fileinfo __construct or open does not work with NULL).
(Pierre)
- Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
--- /dev/null
+--TEST--
+Bug #51791 (constant() failed to check undefined constant and php interpreter stoped)
+--FILE--
+<?php
+
+class A {
+ const B = 1;
+}
+var_dump(constant('A::B1'));
+
+?>
+--EXPECTF--
+Warning: constant(): Couldn't find constant A::B1 in %s on line %d
+NULL
return;
}
- if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, 0 TSRMLS_CC)) {
+ if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", const_name);
RETURN_NULL();
}