I’m relatively new to Yii, been using it for a couple of weeks, and got used to it, but on occasion I get some error without any message to tell me what is wrong.
I have several models in my application so far and calling them like this…
ModelName::model()
…all works fine.
Anyway, now I’ve created another model, and even if I tried renaming it, I cannot seem to access it. Well, I don’t get the error that the model doesn’t exist, I just don’t get anything out, and anything after the line where I call it doesn’t execute.
Here’s exact lines of code…
print_r(GamesInProgress::model());
echo ‘a’;
die();
…needless to say, print_r doesn’t display anything, and echo never happens. If I rename my “GamesInProgress” and call some other model, everything works fine. In the code above, I don’t get the message that the model doesn’t exist, that php file doesn’t exist. I just see the last page I saw when I first got there (if this sentence seems confusing, in other words, if I comment print_r() line and see echo ‘a’ on the screen, and then uncomment it, I will still see ‘a’ on the screen). Otherwise, I get the message “remote server or file not found”.
I don’t know what to do or how to catch the error or display something. The model is pretty simple, a couple of integer fields is all there is in the table, and I created model with gii and all went well.