https://www.php-resource.de/forum/php-developer-forum/103503-trying-to-get-property-of-non-object