-
Improvement
-
Resolution: Deferred
-
Minor
-
None
-
Future Dev
-
None
The moodle_page class uses magic methods for getting and setting properties.
These magic methods lead to problems when trying to use isset on them. It provides results that are not expected.
To avoid this "gotcha" it would be good to add a magic isset method to provide the expected outcome.
Note: We discourage the use of magic method for precisely this reason.
Proof of concept from Andrew:
public function __isset($name): bool {
|
return $this->__get($name) !== null;
|
}
|
|
- Discovered while testing
-
MDL-69474 Improve accessibility of profile images
- Closed