Skip to content

Commit 1d49976

Browse files
committed
Changed fatals to warnings during startup
1 parent ffe7913 commit 1d49976

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static PHP_INI_MH(OnChangeMemoryLimit)
327327
if (PG(max_memory_limit) != -1) {
328328
if (value == -1) {
329329
zend_error(
330-
stage == ZEND_INI_STAGE_STARTUP ? E_ERROR : E_WARNING,
330+
E_WARNING,
331331
"Failed to set memory_limit to unlimited. memory_limit (currently: " ZEND_LONG_FMT " bytes) cannot be set to unlimited if max_memory_limit (" ZEND_LONG_FMT " bytes) is not unlimited",
332332
PG(memory_limit),
333333
PG(max_memory_limit)
@@ -338,7 +338,7 @@ static PHP_INI_MH(OnChangeMemoryLimit)
338338

339339
if (value > PG(max_memory_limit)) {
340340
zend_error(
341-
stage == ZEND_INI_STAGE_STARTUP ? E_ERROR : E_WARNING,
341+
E_WARNING,
342342
"Failed to set memory_limit to %zd bytes. memory_limit (currently: " ZEND_LONG_FMT " bytes) cannot exceed max_memory_limit (" ZEND_LONG_FMT " bytes)",
343343
value,
344344
PG(memory_limit),

tests/basic/gh17951_ini_parse_4.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ max_memory_limit=128M
1111
echo ini_get('max_memory_limit') . PHP_EOL;
1212
echo ini_get('memory_limit') . PHP_EOL;
1313
--EXPECTF--
14-
Fatal error: Failed to set memory_limit to unlimited. memory_limit (currently: %d bytes) cannot be set to unlimited if max_memory_limit (%d bytes) is not unlimited in %s
14+
Warning: Failed to set memory_limit to unlimited. memory_limit (currently: %d bytes) cannot be set to unlimited if max_memory_limit (%d bytes) is not unlimited in %s
1515
128M
1616
128M

tests/basic/gh17951_ini_parse_5.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ max_memory_limit=128M
1111
echo ini_get('max_memory_limit') . PHP_EOL;
1212
echo ini_get('memory_limit') . PHP_EOL;
1313
--EXPECTF--
14-
Fatal error: Failed to set memory_limit to %d bytes. memory_limit (currently: %d bytes) cannot exceed max_memory_limit (%d bytes) in %s
14+
Warning: Failed to set memory_limit to %d bytes. memory_limit (currently: %d bytes) cannot exceed max_memory_limit (%d bytes) in %s
1515
128M
1616
128M

0 commit comments

Comments
 (0)