WordPress/wp-includes/Text
hellofromTonya e97af52b4f Code Modernization: Fix trigger_error() with E_USER_ERROR deprecation in Text_Diff_Op::reverse().
PHP 8.4 deprecates the use of `trigger_errror()` with `E_USER_ERROR` as the error level, as there are a number of gotchas to this way of creating a `Fatal Error` (`finally` blocks not executing, destructors not executing).
The recommended replacements are either to use exceptions or to do a hard `exit`.

This is an unmaintained external dependency; thus, the fix is made in the WP specific copy of the dependency.

As `trigger_error()` call looks to be a remnant of the PHP 4 era before a class could be declared as `abstract`, fixed by making both the method as well as the class `abstract` and removing the call to `trigger_error()`.

Ref:
* https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
* https://www.php.net/manual/en/migration80.incompatible.php

Follow-up to [7747].

Props jrf.
See #62061.
Built from https://develop.svn.wordpress.org/trunk@59106


git-svn-id: http://core.svn.wordpress.org/trunk@58502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-09-27 18:19:17 +00:00
..
Diff Code Modernization: Explicitly declare all properties in `Text_Diff_Engine_native`. 2023-05-12 08:51:22 +00:00
Diff.php Code Modernization: Fix trigger_error() with E_USER_ERROR deprecation in Text_Diff_Op::reverse(). 2024-09-27 18:19:17 +00:00
Exception.php Code Modernization: Fix trigger_error() with E_USER_ERROR deprecation in Text_Diff::_check(). 2024-09-27 17:53:19 +00:00