Error/Warning in Testimonial Widget
-
Hi, I found this new error after upgrading to PHP 7.3. Tested with PHP 7.2 and earlier, PHP did not report this error/warning. But in PHP 7.3, the regular expression syntax is stricter.
Warning: preg_match(): Compilation failed: invalid range in character class at offset 6 in [pathToWordpress]/wp-content/plugins/testimonials-widget/includes/libraries/aihrus-framework/includes/class-aihrus-settings.php on line 806
Original line in file class-aihrus-settings.php:
if ( preg_match( '#^(([\w- ]+)(,\s?)?)+$#', $input ) ) {
It should be replaced to the following for cleaner interpretation:
if ( preg_match( '#^(([\w\-\s]+)(,\s?)?)+$#', $input ) ) {
So, that this plugin is compatible with PHP 7.3.
Hope it helps the developers to fix this bug, and all those who encountered the problem.
Thanks.
- The topic ‘Error/Warning in Testimonial Widget’ is closed to new replies.