Browse Source

Merge pull request #164 from iambrosi/no-is_a

Use instanceof instead of method is_a
1.0
Andrés Montañez 10 years ago
parent
commit
683d11ac90
  1. 2
      Mage/Task/Factory.php

2
Mage/Task/Factory.php

@ -59,7 +59,7 @@ class Factory
$instance = new $className($taskConfig, $inRollback, $stage, $taskParameters); $instance = new $className($taskConfig, $inRollback, $stage, $taskParameters);
if (!is_a($instance, 'Mage\Task\AbstractTask')) { if (!($instance instanceof AbstractTask)) {
throw new Exception('The Task ' . $taskName . ' must be an instance of Mage\Task\AbstractTask.'); throw new Exception('The Task ' . $taskName . ' must be an instance of Mage\Task\AbstractTask.');
} }

Loading…
Cancel
Save