summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-02-04 16:32:53 +0100
committerAndrey Andreev <narf@devilix.net>2021-02-04 16:32:53 +0100
commit0925b5099919300a239909588351a6482c5e792d (patch)
tree4e0596b489defbba7b7590f7e9402035dc338bc5 /system/libraries/Migration.php
parent751a2e364131a67ec64f783003866c0fe2df78e0 (diff)
[ci skip] Fix is_callable()-reliant logic broken by PHP 8
Close #6006, #6007
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index 1b7808923..915d4e453 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -288,7 +288,7 @@ class CI_Migration {
$this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class);
return FALSE;
}
- elseif ( ! is_callable(array($class, $method)))
+ elseif ( ! method_exists($class, $method) OR ! (new ReflectionMethod($class, $method))->isPublic())
{
$this->_error_string = sprintf($this->lang->line('migration_missing_'.$method.'_method'), $class);
return FALSE;