Merge pull request #28 from kusnir/fix-memory-exhausted

FIX PHP Fatal error: Allowed memory size of exhausted
This commit is contained in:
Matt Bonneau 2018-05-02 10:52:00 -04:00 committed by GitHub
commit 1612f528c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ class Frame implements FrameInterface {
* @param callable<\UnderflowException> $ufExceptionFactory
*/
public function __construct($payload = null, $final = true, $opcode = 1, callable $ufExceptionFactory = null) {
$this->ufeg = $ufExceptionFactory ?: function($msg = '') {
$this->ufeg = $ufExceptionFactory ?: static function($msg = '') {
return new \UnderflowException($msg);
};