?? ??? 2016 PHP 7.0.10
- Core:
+ . Fixed bug #72629 (Caught exception assignment to variables ignores
+ references). (Laruence)
. Fixed bug #72594 (Calling an earlier instance of an included anonymous
class fatals). (Laruence)
. Fixed bug #72581 (previous property undefined in Exception after
--- /dev/null
+--TEST--
+Bug #72629 (Caught exception assignment to variables ignores references)
+--FILE--
+<?php
+
+$var = null;
+$e = &$var;
+
+try {
+ throw new Exception;
+} catch (Exception $e) { }
+
+var_dump($var === $e);
+
+--EXPECT--
+bool(true)
USE_OPLINE
zend_class_entry *ce, *catch_ce;
zend_object *exception;
+ zval *ex;
SAVE_OPLINE();
/* Check whether an exception has been thrown, if not, jump over code */
}
exception = EG(exception);
- zval_ptr_dtor(EX_VAR(opline->op2.var));
- ZVAL_OBJ(EX_VAR(opline->op2.var), EG(exception));
+ ex = EX_VAR(opline->op2.var);
+ if (UNEXPECTED(Z_ISREF_P(ex))) {
+ ex = Z_REFVAL_P(ex);
+ }
+ ZVAL_OBJ(ex, EG(exception));
if (UNEXPECTED(EG(exception) != exception)) {
GC_REFCOUNT(EG(exception))++;
HANDLE_EXCEPTION();
USE_OPLINE
zend_class_entry *ce, *catch_ce;
zend_object *exception;
+ zval *ex;
SAVE_OPLINE();
/* Check whether an exception has been thrown, if not, jump over code */
}
exception = EG(exception);
- zval_ptr_dtor(EX_VAR(opline->op2.var));
- ZVAL_OBJ(EX_VAR(opline->op2.var), EG(exception));
+ ex = EX_VAR(opline->op2.var);
+ if (UNEXPECTED(Z_ISREF_P(ex))) {
+ ex = Z_REFVAL_P(ex);
+ }
+ ZVAL_OBJ(ex, EG(exception));
if (UNEXPECTED(EG(exception) != exception)) {
GC_REFCOUNT(EG(exception))++;
HANDLE_EXCEPTION();
// environment var PGSQL_TEST_CONNSTR
// "test" database must exist. i.e. "createdb test" before testing
-$conn_str = getenv('PGSQL_TEST_CONNSTR') ?: "host=localhost dbname=test port=5432"; // connection string
+$conn_str = getenv('PGSQL_TEST_CONNSTR') ?: "host=localhost dbname=test port=5432 user=postgres password=postgres"; // connection string
$table_name = "php_pgsql_test"; // test table that will be created
$table_name_92 = "php_pgsql_test_92"; // test table that will be created
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 0
-#define PHP_RELEASE_VERSION 10
+#define PHP_RELEASE_VERSION 7
#define PHP_EXTRA_VERSION "-dev"
-#define PHP_VERSION "7.0.10-dev"
-#define PHP_VERSION_ID 70010
+#define PHP_VERSION "7.0.7-dev"
+#define PHP_VERSION_ID 70007