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 Deprecated: Function (null)() is deprecated #25

Closed
milo opened this issue Nov 14, 2014 · 11 comments
Closed

PHP Deprecated: Function (null)() is deprecated #25

milo opened this issue Nov 14, 2014 · 11 comments

Comments

@milo
Copy link
Member

milo commented Nov 14, 2014

Forum: http://forum.nette.org/en/21268-nette-framework-2-2-4-released#p145829

This bug shows self in Nette 2.2.4 as:

PHP Notice: Undefined variable: file in .../src/Http/Response.php:299
PHP Notice: Undefined variable: line in .../src/Http/Response.php:299
PHP Deprecated: Function æĄly°Š() is deprecated in Unknown:0
PHP Deprecated: Function (null)::H‰l$čL‰d$šH‰ĶL‰l$ųH‰\$ąH�ģ8H…ÉA‰üI‰õt!H‹ŪźM() is deprecated in .../cache/latte/xxxx-f58ecdceb29baf29d552a02bd25a2224.php:72
PHP Deprecated: Function (null)() is deprecated in ....
Parse Error
Fatal Error Allowed memory size of 134217728 bytes exhausted (tried to allocate 909587003 bytes)

This bug occures on mine website when I migrated to Nette v2.2.4. It is hard to reproduce, I did it by refreshing page and one from 10-50 requests failed by different error message.

I replaced nette/nette: 2.2.4 in composer by all single packages and I started to downgrade packages one by one. After reverting nette/http to v2.2.1, bugs stopped to showself. After that I bisected commits and I found 0914fe9 as buggy. After that, I upgraded back to nette/nette v2.2.4 and starts to reverting single commit changes. When this was reverted, everithing is OK.

I know it sounds like nonsence. And when PHP bug is about memory corruption this is maybe only final crash. Let's wait for forum feedback.

PHP 5.4.16 as a apache2handler, Debian

@JanTvrdik
Copy link
Contributor

@dg
Copy link
Member

dg commented Nov 14, 2014

"Avoid using magic" was bad idea, PHP needs some magic to work :-)

@milo
Copy link
Member Author

milo commented Nov 14, 2014

:-)

@JanTvrdik That's it. According to tags, fixed since 5.4.25 and 5.5.9+.

@JanTvrdik
Copy link
Contributor

The question is – did it really work reliably before? Or is it unusable for PHP < 5.4.25?

@JanTvrdik
Copy link
Contributor

If we believe that it worked before, we can just update to this:

// requires closure due PHP bug #66375
header_register_callback(function() {
  $this->removeDuplicateCookies();
});

I would suggest to increase the requirement at least to 5.4.1 due to another segfault

@xificurk
Copy link

$this should not be used inside closures because of PHP 5.3.

@JanTvrdik
Copy link
Contributor

The code is in condition for PHP 5.4+

@milo
Copy link
Member Author

milo commented Nov 14, 2014

@JanTvrdik agree with Closure and PHP 5.4.1+

JanTvrdik added a commit to JanTvrdik/nette-http that referenced this issue Nov 14, 2014
@dg
Copy link
Member

dg commented Nov 15, 2014

@milo thx for investigation, my today training nearly ended in ruins because of it :-)

@JanTvrdik the question is: is this workaround (for IE) still needed? 👍 for remove it

@Majkl578
Copy link
Contributor

is this workaround (for IE) still needed?

You mean removing duplicit cookie headers? Then yes, it is, there is still a LOT of IE<=9 users out there.

@JanTvrdik
Copy link
Contributor

@Majkl578 The issue however does not affect every IE 9 user. It was officially marked as not reproducible

btw: maybe this will one day be solved in PHP https://bugs.php.net/bug.php?id=67736

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

5 participants