php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65097 nApplyCount release missing
Submitted: 2013-06-22 14:03 UTC Modified: 2013-06-30 02:51 UTC
From: emptyhua at gmail dot com Assigned: laruence (profile)
Status: Closed Package: lua (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-06-22 14:03 UTC] emptyhua at gmail dot com
Description:
------------
nApplyCount release missing

Test script:
---------------
<?php
$lua = new Lua();
$lua->eval("
function main(x)
 return nil
end");
$obj = array(1, 2, 3, array(4, 5, 6));
echo json_encode($obj) . "\n";
$lua->call('main', array($obj));
echo json_encode($obj) . "\n";

Expected result:
----------------
[1,2,3,[4,5,6]]
[1,2,3,[4,5,6]]

Actual result:
--------------
[1,2,3,[4,5,6]]
PHP Warning:  json_encode(): recursion detected in /tmp/test.php on line 10
[1,2,3,null]

Patches

php_lua_release_nApplyCount (last revision 2013-06-22 14:07 UTC by emptyhua at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-25 04:38 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2013-06-30 02:51 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2013-06-30 02:51 UTC] laruence@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

fixed in my own repo, thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC