Closed Sivanwol closed 4 years ago
Call to a member function toAtomString() on null {"exception":"[object] (Error(code: 0): Call to a member function toAtomString() on null at /home/fastwings/Projects/Booksurf/backend/app/JsonApi/Books/Schema.php:33
I don't know if you're still interested in this, anyway it seems that you have a call in your file /home/fastwings/Projects/Booksurf/backend/app/JsonApi/Books/Schema.php
that invokes the method toAtomString()
from a null
object: it's probably related to the function getAttributes($resource)
where you're doing something like $resource->property->toAtomString();
. Ensure that property
is not null :)
Thanks for reporting this and sorry for slow reply - I've been off work for a few weeks.
The error here is that the Exception parser interface hadn't been updated - it was type-hinting an Exception
but actually needs to now type-hint a Throwable
instance. I've fixed and this will be tagged as 2.0.0-beta.2
.
i got this issue it print me Symfony\Component\Debug\Exception\FatalThrowableError Argument 1 passed to CloudCreativity\LaravelJsonApi\Exceptions\ExceptionParser::parse() must be an instance of Exception, instance of TypeError given, called in /home/fastwings/Projects/Booksurf/backend/vendor/cloudcreativity/laravel-json-api/src/Exceptions/HandlesErrors.php on line 73 it on the current dev brench. working with laravel 7 but the issue here that i dont know what the error is and why after lot digging i got this Call to a member function toAtomString() on null {"exception":"[object] (Error(code: 0): Call to a member function toAtomString() on null at /home/fastwings/Projects/Booksurf/backend/app/JsonApi/Books/Schema.php:33) [stacktrace] not surewhat this means