mem vars und others). (Dmitry)
- Fixed bug #28839 (SIGSEGV in interactive mode (php -a)).
(kameshj at fastmail dot fm)
+- Fixed bug #22836 (returning reference to uninitialized variable). (Dmitry)
31 Mar 2005, PHP 5.0.4
- Added SNMPv2 support. (harrie)
Notice: Undefined variable: a in %s on line %d
Strict Standards: Only variable references should be returned by reference in %s on line %d
-string(3) "foo"
-'foo'
-
-Notice: Undefined variable: a in %s on line %d
-
-Strict Standards: Only variable references should be returned by reference in %s on line %d
-
-
zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", Z_OBJCE_P(retval_ptr)->name);
(*EG(return_value_ptr_ptr))->value.obj = Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
} else if (!EG(free_op1)) { /* Not a temp var */
- if (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0) {
+ if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0)) {
ALLOC_ZVAL(*(EG(return_value_ptr_ptr)));
**EG(return_value_ptr_ptr) = *retval_ptr;
(*EG(return_value_ptr_ptr))->is_ref = 0;