Answer the question
In order to leave comments, you need to log in
Why does Yii2 implement the impossibility of accessing undeclared fields?
For example, if there is no type field in the class, then the call to $myClass->type will not terminate the program, but if it is written in the framework class, then it starts to swear at /vendor/yiisoft/yii2/base/Component.php
throw new UnknownPropertyException( 'Getting unknown property: ' .get_class($this) .'::' .$name)
This already infuriates, it seems that everything is fine at the testing stage, but in a battle in some situation it starts to break.
Answer the question
In order to leave comments, you need to log in
calling $myClass->type will not terminate the program
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question