[php-src] master: spl: Fix the parameter name in the spl_autoload_register() notice (#25547)

From: Date: Wed, 18 Nov 2026 10:28:48 +0000
Subject: [php-src] master: spl: Fix the parameter name in the spl_autoload_register() notice (#25547)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143824@lists.php.net to get a copy of this message
Author: Faris Basha TM (farisbasha) Committer: GitHub (web-flow) Pusher: TimWolla Date: 2026-11-18T11:28:45+01:00 Commit: https://github.com/php/php-src/commit/7ac4cb4efadef8b8a89753b21da35e9f23ad20e1 Raw diff: https://github.com/php/php-src/commit/7ac4cb4efadef8b8a89753b21da35e9f23ad20e1.diff spl: Fix the parameter name in the spl_autoload_register() notice (#25547) The notice for passing false as the second argument named it $do_throw, which is the C variable. The parameter is $throw in the stub and the manual. Changed paths: M ext/spl/php_spl.c M ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt Diff: diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 8d516c1543fb..12f05ce7f01c 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -402,7 +402,7 @@ PHP_FUNCTION(spl_autoload_register) ZEND_PARSE_PARAMETERS_END(); if (!do_throw) { - php_error_docref(NULL, E_NOTICE, "Argument #2 ($do_throw) has been ignored, " + php_error_docref(NULL, E_NOTICE, "Argument #2 ($throw) has been ignored, " "spl_autoload_register() will always throw"); } diff --git a/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt b/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt index f16976e78ce2..2f26413e510b 100644 --- a/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt +++ b/ext/spl/tests/autoloading/spl_autoload_warn_on_false_do_throw.phpt @@ -11,6 +11,6 @@ spl_autoload_call('TestClass'); var_dump(class_exists('TestClass', false)); ?> --EXPECTF-- -Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in %s on line %d +Notice: spl_autoload_register(): Argument #2 ($throw) has been ignored, spl_autoload_register() will always throw in %s on line %d %stestclass.class.inc bool(true)

« previous php.cvs (#143824) next »