PHP 8 issues
-
Hi,
Is this plugin still being worked on?
There are few threads, even over year old about PHP 8 issues in it, and they still haven’t been fixed.
Plugin uses abs() function which requires int|float input since PHP 8.0.0, which in certain scenarios results in errors like below.
PHP Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in …/wp-content/plugins/image-widget/image-widget.php:185
Stack trace: 0 …/wp-content/plugins/image-widget/image-widget.php(185): abs() 1 …/wp-includes/class-wp-widget.php(394): Tribe_Image_Widget->widget() 2 …/wp-includes/widgets.php(845): WP_Widget->display_callback() 3 …/wp-content/themes/hemingway/sidebar.php(5): dynamic_sidebar() 4 …/wp-includes/template.php(810): require_once(‘…’) 5 …/wp-includes/template.php(745): load_template() 6 …/wp-includes/general-template.php(136): locate_template() 7 …/wp-content/themes/hemingway/page.php(75): get_sidebar() 8 …/wp-includes/template-loader.php(106): include(‘…’) 9 …/wp-blog-header.php(19): require_once(‘…’) 10 …/index.php(17): require(‘…’) 11 {main} thrown in …/wp-content/plugins/image-widget/image-widget.php on line 185I submitted a PR on Github fixing such issues in case it helps.
The topic ‘PHP 8 issues’ is closed to new replies.