Bug #77535 [Opn->Csd]: Invalid callback, h2 server push

From: Date: Fri, 15 Mar 2019 18:22:13 +0000
Subject: Bug #77535 [Opn->Csd]: Invalid callback, h2 server push
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219988@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77535&edit=1 ID: 77535 Updated by: pmmaga@php.net Reported by: tobias dot nyholm at gmail dot com Summary: Invalid callback, h2 server push -Status: Open +Status: Closed Type: Bug Package: cURL related PHP Version: master-Git-2019-01-28 (Git) -Assigned To: +Assigned To: pmmaga Block user comment: N Private report: N New Comment: This issue has been fixed by the commit from NikiC and I've pushed a test via https://github.com/php/php-src/commit/f167b06d4c86c96291c21c027ba3cae22f5b5be8 Previous Comments: ------------------------------------------------------------------------ [2019-03-15 16:10:42] nikic@php.net I've committed https://github.com/php/php-src/commit/97f9fd6949a52d1eb30c3e1c90f0789b57c29468 to fix this, but don't have a curl to test with (segfaults for other reasons). ------------------------------------------------------------------------ [2019-02-02 13:04:04] tobias dot nyholm at gmail dot com I think I've figured it out. (Or, I got help figure this out) It is related to the garbage collector. If I do $this->tmp $callback = function.... Then I've got not issues. ------------------------------------------------------------------------ [2019-01-28 21:39:42] tobias dot nyholm at gmail dot com Using a callback like "[$this, '_callback']" does not work. I did manage to declare a global function foobar() and use "foobar" as callback. But that seams suboptimal. ------------------------------------------------------------------------ [2019-01-28 21:12:28] pmmaga@php.net IIRC, and according to the warning, the current implementation is only accepting callables but not Closures. If you make the callback as a named function it should be possible to set it up. ------------------------------------------------------------------------ [2019-01-28 21:05:36] tobias dot nyholm at gmail dot com Btw, You can test this with this repo: https://github.com/Nyholm/php-test-server-push There is a test called "test77535.php" ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77535 -- Edit this bug report at https://bugs.php.net/bug.php?id=77535&edit=1

« previous php.bugs (#219988) next »