slimphp / Slim

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
http://slimframework.com
MIT License
11.98k stars 1.95k forks source link

Can't use method return value in write context in \Slim\Http\Request.php on line 159 #1244

Closed kminek closed 9 years ago

kminek commented 9 years ago

after latest changes

akrabat commented 9 years ago

Can you provide sample code that shows the problem?

kminek commented 9 years ago

sample code: https://github.com/slimphp/Slim/tree/develop#usage it's fatal error

my composer.json:

"slim/slim": "dev-develop"
kminek commented 9 years ago

i am using PHP 5.4.25

after googling around:

limitation of empty() in PHP versions below 5.5: empty() only checks variables as anything else will result in a parse error. In other words, the following will not work: empty(trim($name))

akrabat commented 9 years ago

aha! We'll have to get that captured in a unit test and get Travis up and running

tuupola commented 9 years ago

Seems it is already catched. 5.4 build failed with the above error message.

https://travis-ci.org/slimphp/Slim/jobs/63999203

akrabat commented 9 years ago

That's interesting!

akrabat commented 9 years ago

@kminek I think I've fixed this via PR #1245 - are you able test?

akrabat commented 9 years ago

Appears to work: https://travis-ci.org/slimphp/Slim/jobs/64138247

kminek commented 9 years ago

works for me too :)

silentworks commented 9 years ago

This has now been merged into develop.