aaronpk / Quill

🖋 A Micropub client for creating posts
https://quill.p3k.io/
117 stars 25 forks source link

file_get_contents(): Filename cannot be empty #84

Closed cweiske closed 7 years ago

cweiske commented 7 years ago

I wanted to post a reply to commentpara.de and got the error

Your endpoint did not return a Location header. See Creating a Micropub Endpoint for more information.

When inspecting the network traffic, I saw:

Slim Application Error
The application could not run because of the following error:

Details

Type: ErrorException
Code: 2
Message: file_get_contents(): Filename cannot be empty
File: /web/sites/quill.p3k.io/lib/helpers.php
Line: 127
Trace

#0 [internal function]: Slim\Slim::handleErrors(2, 'file_get_conten...', '/web/sites/quil...', 127, Array)
#1 /web/sites/quill.p3k.io/lib/helpers.php(127): file_get_contents('')
#2 /web/sites/quill.p3k.io/lib/helpers.php(88): micropub_post('https://comment...', Array, 'ZW1vamk9JTVDMzY...', NULL, false)
#3 /web/sites/quill.p3k.io/controllers/micropub.php(61): micropub_post_for_user(Object(ORM), Array)
#4 [internal function]: {closure}()
#5 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Router.php(172): call_user_func_array(Object(Closure), Array)
#6 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Slim.php(1222): Slim\Router->dispatch(Object(Slim\Route))
#7 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/Flash.php(86): Slim\Slim->call()
#8 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/MethodOverride.php(94): Slim\Middleware\Flash->call()
#9 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#10 /web/sites/quill.p3k.io/vendor/slim/slim/Slim/Slim.php(1174): Slim\Middleware\PrettyExceptions->call()
#11 /web/sites/quill.p3k.io/public/index.php(25): Slim\Slim->run()
#12 {main}

2017-08-18 auswahl_001

cweiske commented 7 years ago

Maybe it's because of #79 that anoweco still uses. In any case, there should be better error handling on quill's PHP side.


No, it isn't.

aaronpk commented 7 years ago

This was caused by https://github.com/aaronpk/Quill/pull/82 and then I fixed it in https://github.com/aaronpk/Quill/commit/ae4cbc49c4e6d25923a4e0a3242ea51f1695da22 but forgot to deploy it. It's deployed now!