Loading sources/fields.php +11 −5 Original line number Diff line number Diff line Loading @@ -391,12 +391,18 @@ function get_fields_hook(string $type) : object // Try creating an object factory as a last resort $path = 'hooks/systems/fields/' . filter_naughty($type); set_throw_errors(true); try { require_code($path); $ob = object_factory('Hook_fields_' . filter_naughty($type)); if (is_object($ob)) { $fields_hook_cache[$type] = $ob; return $ob; } } catch (CMSException $e) { $ob = null; } set_throw_errors(false); // We got nothing; fall back to short_text if ($type == 'short_text') { // Uh oh! We already tried short_text. Loading Loading
sources/fields.php +11 −5 Original line number Diff line number Diff line Loading @@ -391,12 +391,18 @@ function get_fields_hook(string $type) : object // Try creating an object factory as a last resort $path = 'hooks/systems/fields/' . filter_naughty($type); set_throw_errors(true); try { require_code($path); $ob = object_factory('Hook_fields_' . filter_naughty($type)); if (is_object($ob)) { $fields_hook_cache[$type] = $ob; return $ob; } } catch (CMSException $e) { $ob = null; } set_throw_errors(false); // We got nothing; fall back to short_text if ($type == 'short_text') { // Uh oh! We already tried short_text. Loading