Skip to content

Commit dcd2a0d

Browse files
authored
Make return type of trigger_error() and user_error() true (#13169)
1 parent 45f8cfa commit dcd2a0d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ PDO_SQLITE:
267267
5. Changed Functions
268268
========================================
269269

270+
- Core:
271+
. trigger_error() and user_error() now have a return type of true instead of
272+
bool.
273+
270274
- DOM:
271275
. DOMDocument::registerNodeClass() now has a tentative return type of true.
272276
Previously, the return type was bool but only true could be returned in practice.

Zend/zend_builtin_functions.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ function get_included_files(): array {}
9595
*/
9696
function get_required_files(): array {}
9797

98-
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {}
98+
function trigger_error(string $message, int $error_level = E_USER_NOTICE): true {}
9999

100100
/** @alias trigger_error */
101-
function user_error(string $message, int $error_level = E_USER_NOTICE): bool {}
101+
function user_error(string $message, int $error_level = E_USER_NOTICE): true {}
102102

103103
/** @return callable|null */
104104
function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}

Zend/zend_builtin_functions_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)