Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.12 "A non-numeric value encountered" #1004

Closed
exodus4d opened this issue Feb 24, 2017 · 4 comments
Closed

PHP 7.12 "A non-numeric value encountered" #1004

exodus4d opened this issue Feb 24, 2017 · 4 comments

Comments

@exodus4d
Copy link

[23-Feb-2017 18:42:16 UTC] A non-numeric value encountered 
[23-Feb-2017 18:42:16 UTC] [I:/webpages/pathfinder/app/lib/base.php:2159] Base->error() 
[23-Feb-2017 18:42:16 UTC] [I:/webpages/pathfinder/app/lib/base.php:1122] Base->{closure}()

And here is how to fix it (int) cast is required: https://github.com/bcosca/fatfree/blob/master/lib/base.php#L1119

header('Expires: '.gmdate('r',$time+(int)$secs));

And here is why this happens: dompdf/dompdf#1272

@KOTRET
Copy link
Collaborator

KOTRET commented Feb 24, 2017

that means you are calling expire with an empty string instead of a number?

@exodus4d
Copy link
Author

I don´t call the expire() function from anywhere in my code :)

I have some Ajax routes like this:

GET|POST /api/@controller/@action               [ajax]  =   Controller\Api\@controller->@action, , 512

I guess the "empty string" before the throttling of 512 is responsible for that. Ill try to set it it explicit to 0 when I´m back home

@exodus4d
Copy link
Author

Yeah setting it to 0 fixed it as well.
You can decide whether you want to change/fix this or not.
Feel free to close this issue, if you want.

@KOTRET
Copy link
Collaborator

KOTRET commented Feb 24, 2017

well, although its more of a configuration-issue, this should be fixed with a cast ($secs = (int)$secs;) to make the framework more robust.

Edit: to clearify: a blank " " string is passed, not an empty string

ikkez added a commit to f3-factory/fatfree-core that referenced this issue Feb 24, 2017
@ikkez ikkez closed this as completed Feb 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants