diff --git a/README b/README index 2825319..7c3442c 100644 --- a/README +++ b/README @@ -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 diff --git a/lua.c b/lua.c index debbee7..d6dee2c 100644 --- a/lua.c +++ b/lua.c @@ -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; @@ -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: