Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
"Lua is a powerful, fast, light-weight, embeddable scripting language."
This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.

==2013-06-24
* bugfix:https://bugs.php.net/bug.php?id=65097
* don't ignore 0 index when converting php var to lua
6 changes: 1 addition & 5 deletions lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,6 @@ int php_lua_send_zval_to_lua(lua_State *L, zval *val TSRMLS_DC) {
ZVAL_STRINGL(zkey, key, len - 1, 1);
break;
case HASH_KEY_IS_LONG:
if (idx == 0) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE
, "attempt to pass an array index begin with 0 to lua, the index 0 will be discarded");
continue;
}
MAKE_STD_ZVAL(zkey);
ZVAL_LONG(zkey, idx);
break;
Expand All @@ -469,6 +464,7 @@ int php_lua_send_zval_to_lua(lua_State *L, zval *val TSRMLS_DC) {

zval_ptr_dtor(&zkey);
}
--ht->nApplyCount;
}
break;
default:
Expand Down