fatal error
-
today i updated moowoodle plugin to version 3.3.0 and the site broke with a fatal error.
i fixed it by altering the installer.php (where the error occurs)
open file:
/wp-content/plugins/moowoodle/classes/Installer.php
around rule 260 you see an array. thats where the error occurs.
Uncomment that whole block and replace it with this code:
$course_data = array(
'moodle_course_id' => is_array($all_meta['moodle_course_id'] ?? null) ? reset($all_meta['moodle_course_id']) : 0,
'shortname' => is_array($all_meta['_course_short_name'] ?? null) ? reset($all_meta['_course_short_name']) : '',
'category_id' => is_array($all_meta['_category_id'] ?? null) ? reset($all_meta['_category_id']) : 0,
'fullname' => sanitize_text_field($course->post_title),
'product_id' => is_array($all_meta['linked_product_id'] ?? null) ? reset($all_meta['linked_product_id']) : 0,
'startdate' => is_array($all_meta['_course_startdate'] ?? null) ? reset($all_meta['_course_startdate']) : 0,
'enddate' => is_array($all_meta['_course_enddate'] ?? null) ? reset($all_meta['_course_enddate']) : 0,
);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘fatal error’ is closed to new replies.