Skip to content

Commit f02f67e

Browse files
author
Thies C. Arntzen
committed
fixed NPR
1 parent ccb7e4f commit f02f67e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ext/standard/assert.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,17 @@ PHP_MSHUTDOWN_FUNCTION(assert)
106106

107107
PHP_RINIT_FUNCTION(assert)
108108
{
109+
char *cbstr;
110+
109111
ASSERTLS_FETCH();
110112

111-
ASSERT(callback) = estrdup(INI_STR("assert.callback"));
113+
cbstr = INI_STR("assert.callback");
114+
115+
if (cbstr) {
116+
ASSERT(callback) = estrdup(cbstr);
117+
} else {
118+
ASSERT(callback) = NULL;
119+
}
112120

113121
return SUCCESS;
114122
}

0 commit comments

Comments
 (0)