svn: /php/php-src/ branches/PHP_5_3/ext/standard/assert.c branches/PHP_5_4/ext/standard/assert.c trunk/ext/standard/assert.c
| From: | Ilia Alshanetsky | Date: | Thu, 26 May 2011 18:17:43 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/standard/assert.c branches/PHP_5_4/ext/standard/assert.c trunk/ext/standard/assert.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65045@lists.php.net to get a copy of this message | ||
iliaa Thu, 26 May 2011 18:17:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=311451
Log:
Fixed bug #54924 (assert.* is not being reset upon request shutdown).
Bug: http://bugs.php.net/54924 (Open) assert.active is not
being reset upon request shutdown
Changed paths:
U php/php-src/branches/PHP_5_3/ext/standard/assert.c
U php/php-src/branches/PHP_5_4/ext/standard/assert.c
U php/php-src/trunk/ext/standard/assert.c
Modified: php/php-src/branches/PHP_5_3/ext/standard/assert.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/assert.c 2011-05-26 16:38:39 UTC (rev 311450)
+++ php/php-src/branches/PHP_5_3/ext/standard/assert.c 2011-05-26 18:17:43 UTC (rev 311451)
@@ -253,8 +253,8 @@
case ASSERT_ACTIVE:
oldint = ASSERTG(active);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(active) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.active", sizeof("assert.active"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -262,8 +262,8 @@
case ASSERT_BAIL:
oldint = ASSERTG(bail);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(bail) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.bail", sizeof("assert.bail"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -271,8 +271,8 @@
case ASSERT_QUIET_EVAL:
oldint = ASSERTG(quiet_eval);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(quiet_eval) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.quiet_eval", sizeof("assert.quiet_eval"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -280,8 +280,8 @@
case ASSERT_WARNING:
oldint = ASSERTG(warning);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(warning) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.warning", sizeof("assert.warning"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
Modified: php/php-src/branches/PHP_5_4/ext/standard/assert.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/assert.c 2011-05-26 16:38:39 UTC (rev 311450)
+++ php/php-src/branches/PHP_5_4/ext/standard/assert.c 2011-05-26 18:17:43 UTC (rev 311451)
@@ -253,8 +253,8 @@
case ASSERT_ACTIVE:
oldint = ASSERTG(active);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(active) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.active", sizeof("assert.active"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -262,8 +262,8 @@
case ASSERT_BAIL:
oldint = ASSERTG(bail);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(bail) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.bail", sizeof("assert.bail"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -271,8 +271,8 @@
case ASSERT_QUIET_EVAL:
oldint = ASSERTG(quiet_eval);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(quiet_eval) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.quiet_eval", sizeof("assert.quiet_eval"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -280,8 +280,8 @@
case ASSERT_WARNING:
oldint = ASSERTG(warning);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(warning) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.warning", sizeof("assert.warning"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
Modified: php/php-src/trunk/ext/standard/assert.c
===================================================================
--- php/php-src/trunk/ext/standard/assert.c 2011-05-26 16:38:39 UTC (rev 311450)
+++ php/php-src/trunk/ext/standard/assert.c 2011-05-26 18:17:43 UTC (rev 311451)
@@ -253,8 +253,8 @@
case ASSERT_ACTIVE:
oldint = ASSERTG(active);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(active) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.active", sizeof("assert.active"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -262,8 +262,8 @@
case ASSERT_BAIL:
oldint = ASSERTG(bail);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(bail) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.bail", sizeof("assert.bail"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -271,8 +271,8 @@
case ASSERT_QUIET_EVAL:
oldint = ASSERTG(quiet_eval);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(quiet_eval) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.quiet_eval", sizeof("assert.quiet_eval"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;
@@ -280,8 +280,8 @@
case ASSERT_WARNING:
oldint = ASSERTG(warning);
if (ac == 2) {
- convert_to_long_ex(value);
- ASSERTG(warning) = Z_LVAL_PP(value);
+ convert_to_string_ex(value);
+ zend_alter_ini_entry_ex("assert.warning", sizeof("assert.warning"),
Z_STRVAL_PP(value), Z_STRLEN_PP(value), PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
}
RETURN_LONG(oldint);
break;