Skip to content

Commit 4dbdf51

Browse files
committed
Zend: Normalize empty string to NULL in OnUpdateStrNotEmpty
1 parent d4d171b commit 4dbdf51

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Zend/zend_ini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ ZEND_API ZEND_INI_MH(OnUpdateStrNotEmpty) /* {{{ */
10301030

10311031
if (new_value && ZSTR_LEN(new_value) == 0) {
10321032
*p = NULL;
1033-
return FAILURE;
1033+
return SUCCESS;
10341034
}
10351035

10361036
*p = new_value;

ext/standard/tests/serialize/gh23082.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ unserialize('O:20:"SomeNotExistingClass":0:{}');
2121
?>
2222
--EXPECT--
2323
string(0) ""
24-
bool(false)
2524
string(11) "my_callback"
25+
string(0) ""

0 commit comments

Comments
 (0)