-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecated $php_errormsg in PHP 7.2
From the PHP 8.0 migration guide (https://www.php.net/manual/de/migration80.incompatible.php): The track_errors ini directive has been removed. This means that php_errormsg is no longer available. The error_get_last() function may be used instead. Also the documentation on $php_errormsg (https://www.php.net/manual/en/reserved.variables.phperrormsg.php) says: This feature has been DEPRECATED as of PHP 7.2.0. Relying on this feature is highly discouraged. Use error_get_last() instead. The functions Horde_String::convertCharset and Horde_String::_pos are broken up to assist in better testability and additional tests for the newly introduced functions are added. This commit breaks compatibility with PHP 5.6 Signed-off-by: Daniel Ziegenberg <[email protected]>
- Loading branch information
1 parent
c8ee322
commit 39c627e
Showing
3 changed files
with
168 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Wrapper to test internal Horde_String methods. | ||
* | ||
* @author Daniel Ziegenberg <[email protected]> | ||
* @category Horde | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Util | ||
*/ | ||
class Horde_Util_Mock_String extends Horde_String | ||
{ | ||
public static function testConvertCharsetIconv(string $input, string $from, string $to) | ||
{ | ||
return self::_convertCharsetIconv($input, $from, $to); | ||
} | ||
|
||
public static function testPosMbstring(string $haystack, string $needle, int $offset, string $charset, string $func) | ||
{ | ||
return self::_posMbstring($haystack, $needle, $offset, $charset, $func); | ||
} | ||
|
||
public static function testPosIntl(string $haystack, string $needle, int $offset, string $charset, string $func) | ||
{ | ||
return self::_posIntl($haystack, $needle, $offset, $charset, $func); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters