Last active
December 25, 2017 07:28
-
-
Save srsad/45d20f917f6d62252f7e5ac4daf5a6cf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// православный способ обработки "Fatal error: Call to a member function ..." | |
$res = $modx->getObject('className', 5); | |
if (is_object($res) && $res->get('id')) { | |
echo '1'; | |
} else { | |
echo '0'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment