Hi, everyone.
The Yii-Autoloader is missing an simple,important Exception.
Let´s assume an Object is not available in the filesystem, for example models/Object.php.
Now i call:
Object::model()->findByPk(1);
I get an php error:
Instead of this, it would be better an Exception would be raised:
try{
<wrong code >
} {
catch (Exception $e) { echo $e->getMessage();
}
would display my mistake.
Update:
It would also be fine if yii would raise an exception when i fail to parameterize all placeholders in CDbCriteria, an example:
$criteria->condition='user_id = :user_id';
$criteria->params = array('userid' => 1);
here the _ and (optional) the : is missing in the $criteria->params.
I get the following error:
which would also be more elegant in an Exception, something like "warning: not all placeholders have been parameterized" or something.
Or doesn´t it?