Plugin can’t be activated because it triggered a fatal error (fix)
-
file
maxbgalleria-media-library.php
, findprivate function get_folders
, replace entire definition with:private function get_folders($path) { $sub_folders = explode('/', $path); foreach($sub_folders as $id => $folderName) if ( $folderName === $this->uploads_folder_name ) return array_slice($sub_folders, $id+1); return []; }
Not sure if it returns the correct data on failure (please tweak to taste), but it’ll fix the infinite loop you have in there (array_shift won’t fail to shift an empty array, so if it never matches, it never returns)
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Plugin can’t be activated because it triggered a fatal error (fix)’ is closed to new replies.