|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 Aug 2015, PHP 7.0.0 RC 1
-
+- Standard:
+ . Fixed bug #70208 (Assert breaking access on objects). (Bob)
06 Aug 2015, PHP 7.0.0 Beta 3
--- /dev/null
+--TEST--
+Bug #70208 (scope information must be preserved with assert())
+--FILE--
+<?php
+
+function non_class_scope() {
+ return true;
+}
+
+class test {
+ protected $prop = 1;
+
+ public function __construct() {
+ assert('non_class_scope();');
+ var_dump($this->prop);
+ }
+}
+
+new test;
+
+?>
+--EXPECT--
+int(1)
if (Z_TYPE_P(assertion) == IS_STRING) {
zval retval;
int old_error_reporting = 0; /* shut up gcc! */
+ zend_class_entry *orig_scope = EG(scope);
myeval = Z_STRVAL_P(assertion);
EG(error_reporting) = old_error_reporting;
}
+ EG(scope) = orig_scope;
+
convert_to_boolean(&retval);
val = Z_TYPE(retval) == IS_TRUE;
} else {