Fatal error on course page after PHP 8
-
Hi, I’m testing an upgrade from PHP 7.4 to PHP 8.1 and after upgrading, I’ve started getting a fatal error on the front page of courses (/course/[course-name]). The error is:
2022/12/21 14:35:22 [error] 31782#31782: *830 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method Sensei_Course::course_image() cannot be called statically in [path]/wp-includes/class-wp-hook.php:308 Stack trace: 0 [path]/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 1 [path]/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 2 [path]/wp-content/plugins/sensei-lms/templates/single-course.php(35): do_action('sensei_single_c…', 6181) 3 [path]/wp-includes/template-loader.php(106): include('[path]…') 4 [path]/wp-blog-header.php(19): require_once('[path]_…') 5 [path]/index.php(17): require('[path]_…') 6 {main} thrown in [path]/wp-includes/class-wp-hook.php on line 308"
I’m using the free version of Sensei LMS and this error persists after upgrading to the newest version, 4.9.1 as of this writing. It seems that this error is happening in a core file of the Sensei LMS plugin and affects only PHP 8+.
Could you please let me know if there is a fix available for this issue?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fatal error on course page after PHP 8’ is closed to new replies.