https://www.php-resource.de/forum/php-developer-forum/42409-object-to-string-conversion-problem