Laravel Headless eCommerce APIs allow you to experience seamless and easily scalable storefront performance. An open-source and GraphQL based Rest API Laravel platform delivering ultra-fast, dynamic, and personalized shopping experiences.
I found a small issue.
When i tried to upload an image, i got an exception:
{ "errors": [ { "message": "Internal server error", "locations": [ { "line": 2, "column": 13 } ], "path": [ "uploadImage" ], "extensions": { "debugMessage": "Only variables should be passed by reference", "file": "C:\\laragon\\www\\devbagisto\\vendor\\bagisto\\graphql-api\\src\\BagistoGraphql.php", "line": 768, ........
So this is the line 768 of graphql-api\src\BagistoGraphql.php:
$ext = strtolower(array_pop(explode('.', $filename)));
should be replaced by this:
$parts = explode('.', $filename); $ext = strtolower(array_pop($parts));
Initially, if you save the result of explode() in a variable, then this variable can be sent as reference to array_pop(). This approach eliminates the direct function call problem, thus, satisfying PHP's requirement for the passing of references.
HI!
I found a small issue. When i tried to upload an image, i got an exception:
{ "errors": [ { "message": "Internal server error", "locations": [ { "line": 2, "column": 13 } ], "path": [ "uploadImage" ], "extensions": { "debugMessage": "Only variables should be passed by reference", "file": "C:\\laragon\\www\\devbagisto\\vendor\\bagisto\\graphql-api\\src\\BagistoGraphql.php", "line": 768, ........
So this is the line 768 of graphql-api\src\BagistoGraphql.php:
$ext = strtolower(array_pop(explode('.', $filename)));
should be replaced by this:
$parts = explode('.', $filename); $ext = strtolower(array_pop($parts));
Initially, if you save the result of explode() in a variable, then this variable can be sent as reference to array_pop(). This approach eliminates the direct function call problem, thus, satisfying PHP's requirement for the passing of references.