Skip to content

Commit 657aebd

Browse files
committed
Check if component has request method before calling
1 parent cd23047 commit 657aebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/component/component.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ function loadComponents() {
282282
if (isset($view->_component[$component])) {
283283
$comp = &$view->_component[$component];
284284
$results = &$comp[$index];
285-
$object = $results['_instance'];
285+
$object = $results['_instance'] ?? false;
286286

287-
if (method_exists($object, 'request')) {
287+
if ($object && method_exists($object, 'request')) {
288288
$object->request($results, $index);
289289
}
290290
}

0 commit comments

Comments
 (0)