Create a gist now

Instantly share code, notes, and snippets.

@AD7six /AppModel.php Secret
Last active Dec 15, 2015

What would you like to do?
public function __construct($id = false, $table = null, $ds = null) {
parent::__construct($id, $table, $ds);
if ((PHP_SAPI !== 'cli' && !defined('CORE_TEST_CASES')) && get_class($this) === 'AppModel') {
throw new \Exception(sprintf(
'AppModel was initialized for "%s" (table "%s"), either the model doesn\'t exist or there is a reference to it using a different plugin.',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment