Skip to content

Commit 2c4b9e9

Browse files
authored
[JIT] Print out more meaningful warning message
* [JIT] Print out more meaningful warning message When the setting value is out of range for jit_hot_loop, jit_hot_func, jit_hot_return, and jit_hot_side_exit, current PHP only prints out warning message like: Warning: Invalid "opcache.jit_hot_loop" setting. Should be between 0 and 256 in Unknown on line 0 With this small patch, PHP can print out more meaningful information, and tell user default value will be used and correct value range, like Warning: Invalid "opcache.jit_hot_loop" setting; using default value instead. Should be between 0 and 255 in Unknown on line 0 This patch has been verified on my local machine. Signed-off-by: Su, Tao <[email protected]> Co-authored-by: Michael Voříšek <[email protected]> Co-authored-by: Christoph M. Becker <[email protected]> Closes GH-7955.
1 parent 3e32717 commit 2c4b9e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/zend_accelerator_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static ZEND_INI_MH(OnUpdateCounter)
182182
*p = val;
183183
return SUCCESS;
184184
}
185-
zend_error(E_WARNING, "Invalid \"%s\" setting. Should be between 0 and 256", ZSTR_VAL(entry->name));
185+
zend_error(E_WARNING, "Invalid \"%s\" setting; using default value instead. Should be between 0 and 255", ZSTR_VAL(entry->name));
186186
return FAILURE;
187187
}
188188

0 commit comments

Comments
 (0)