{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/zephir/issues/901","labels_url":"https://api.github.com/repos/phalcon/zephir/issues/901/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/zephir/issues/901/comments","events_url":"https://api.github.com/repos/phalcon/zephir/issues/901/events","html_url":"https://github.com/phalcon/zephir/issues/901","id":69606442,"number":901,"title":"func_get_args PHP Zephir\\CompilerException:  Method 'Twig\\Compiler::write' called with a wrong number of parameters","user":{"login":"valVk","id":1130626,"avatar_url":"https://avatars.githubusercontent.com/u/1130626?v=3","gravatar_id":"","url":"https://api.github.com/users/valVk","html_url":"https://github.com/valVk","followers_url":"https://api.github.com/users/valVk/followers","following_url":"https://api.github.com/users/valVk/following{/other_user}","gists_url":"https://api.github.com/users/valVk/gists{/gist_id}","starred_url":"https://api.github.com/users/valVk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valVk/subscriptions","organizations_url":"https://api.github.com/users/valVk/orgs","repos_url":"https://api.github.com/users/valVk/repos","events_url":"https://api.github.com/users/valVk/events{/privacy}","received_events_url":"https://api.github.com/users/valVk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-20T14:58:01Z","updated_at":"2015-04-20T15:13:59Z","closed_at":"2015-04-20T15:06:42Z","body":"Latest Zephir's commit\r\n\r\n```\r\ncommit 941cd3ea858ba78aeafe7169cf222b83f53641a2\r\nMerge: 95cccb1 80eea0b\r\nAuthor: Andres Gutierrez <gutierrezandresfelipe@gmail.com>\r\nDate:   Sun Apr 19 10:20:14 2015 -0500\r\n\r\n    Merge pull request #895 from steffengy/fix\r\n    \r\n    Fix #894: Static property access may observe non-tracked temp variables\r\n\r\n```\r\n\r\nCode I try to compile.\r\n\r\n```php \r\n\r\n\tpublic function write()\r\n\t{\r\n\t\tvar strings, k, v;\r\n\r\n\t\tlet strings = func_get_args();\r\n\t\tfor k, v in strings {\r\n\t\t\tthis->addIndentation();\r\n\t\t\tlet this->source .= v;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\tpublic function addDebugInfo(<\\Twig\\NodeInterface> node)\r\n\t{\r\n\t\tif (node->getLine() != this->lastLine) {\r\n\t\t\tthis->write(sprintf(\"// line %d\\\\n\", node->getLine()));\r\n\r\n\t\t\tif (((int) ini_get(\"mbstring.func_overload\")) & 2) {\r\n\t\t\t\t// this is much slower than the \"right\" version\r\n\t\t\t\tlet this->sourceLine += mb_substr_count(mb_substr(this->source, this->sourceOffset), \"\\\\n\");\r\n\t\t\t} else {\r\n\t\t\t\tlet this->sourceLine += substr_count(this->source, \"\\\\n\", this->sourceOffset);\r\n\t\t\t}\r\n\t\t\tlet this->sourceOffset = strlen(this->source);\r\n\t\t\tlet this->debugInfo[this->sourceLine] = node->getLine();\r\n\r\n\t\t\tlet this->lastLine = node->getLine();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n```\r\n\r\nThis code produce the error\r\n\r\n```\r\nPHP Zephir\\CompilerException:  Method 'Twig\\Compiler::write' called with a wrong number of parameters, the method has: 0, passed: 1 in /work/zephir-projects/Twig/zephir/twig/twig/compiler.zep on line 141 in /work/zephir/Library/MethodCall.php on line 224\r\n```\r\n\r\nSo my question is, how I can avoid this error when I use variadic methods?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/phalcon/zephir/issues/comments/94480486","html_url":"https://github.com/phalcon/zephir/issues/901#issuecomment-94480486","issue_url":"https://api.github.com/repos/phalcon/zephir/issues/901","id":94480486,"user":{"login":"valVk","id":1130626,"avatar_url":"https://avatars.githubusercontent.com/u/1130626?v=3","gravatar_id":"","url":"https://api.github.com/users/valVk","html_url":"https://github.com/valVk","followers_url":"https://api.github.com/users/valVk/followers","following_url":"https://api.github.com/users/valVk/following{/other_user}","gists_url":"https://api.github.com/users/valVk/gists{/gist_id}","starred_url":"https://api.github.com/users/valVk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valVk/subscriptions","organizations_url":"https://api.github.com/users/valVk/orgs","repos_url":"https://api.github.com/users/valVk/repos","events_url":"https://api.github.com/users/valVk/events{/privacy}","received_events_url":"https://api.github.com/users/valVk/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T15:13:59Z","updated_at":"2015-04-20T15:13:59Z","body":"Is that Local [Symbol Table](http://zephir-lang.com/language.html#local-symbol-table)?"}}