var_dump of a File object
Permalink
it is possible to use var_dump() on a file object ? (File::getByID())
i get a huge output whith thousands of line that cause a max_memory error.
thanks
i get a huge output whith thousands of line that cause a max_memory error.
thanks
Surely possible, but your system can't handle it. Why you need to dump it in the first place? If you want to know if it's a real file, check it against its class or if it's an object?
thank you for your answer and sorry for my late response, i had a strange behaviour with that object, i get "not object" error even i was sure the object exist.
now i think it is solved.
i'm not sure but i think the problem was due to multiple instance of the block in the same page, so in some way the file object i was debugging where overwritten by other blocks.
thank you
now i think it is solved.
i'm not sure but i think the problem was due to multiple instance of the block in the same page, so in some way the file object i was debugging where overwritten by other blocks.
thank you
<?php $file = \File::getByID(420); var_dump_safe($file);
thank for your answer, i didn't know about var_dump_safe(), you helped me a lot,