-
-
Save AD7six/659715af1699ab0569fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
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.', | |
$this->alias, | |
$this->table | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment