|
@@ -105,12 +105,15 @@ abstract class AddonController implements DefaultController
|
|
|
*/
|
|
*/
|
|
|
public function isValidIntegrationCallback($callback = null)
|
|
public function isValidIntegrationCallback($callback = null)
|
|
|
{
|
|
{
|
|
|
- if (is_callable($callback))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ if(!is_array($callback))
|
|
|
|
|
+ {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $callback = array_reverse($callback);
|
|
|
|
|
+ $class = array_pop($callback);
|
|
|
|
|
+ $method = array_pop($callback);
|
|
|
|
|
+
|
|
|
|
|
+ return is_string($class) && is_string($method) && method_exists($class, $method);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|