Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument 1 passed to PHPCompiler\Compiler::compileOps() must be of the type array, object given #74

Open
Sarke opened this issue Mar 2, 2020 · 1 comment

Comments

@Sarke
Copy link

Sarke commented Mar 2, 2020

Fatal error: Uncaught TypeError: Argument 1 passed to PHPCompiler\Compiler::compileOps() must be of the type array, object given, called in /compiler/lib/Compiler.php on line 113 and defined in /compiler/lib/Compiler.php:60
Stack trace:
#0 /compiler/lib/Compiler.php(113): PHPCompiler\Compiler->compileOps(Object(PHPCfg\Block), Object(PHPCompiler\Block))
#1 /compiler/lib/Compiler.php(100): PHPCompiler\Compiler->compileClassBody(Object(PHPCfg\Block), 19)
#2 /compiler/lib/Compiler.php(70): PHPCompiler\Compiler->compileClassLike(Object(PHPCfg\Op\Stmt\Class_), Object(PHPCompiler\Block))
#3 /compiler/lib/Compiler.php(57): PHPCompiler\Compiler->compileOps(Array, Object(PHPCompiler\Block))
#4 /compiler/lib/Compiler.php(51): PHPCompiler\Compiler->compileBlock(Object(PHPCompiler\Block))
#5 /compiler/lib/Compiler.php(29): PHPCompiler\Compiler->compileCfgBlock(Object(PHPCfg\Block))
#6 /compiler/lib/Runtime.php(136): PHPCompiler\Compiler->compile(Object(PHPCfg\Script))
#7 /compiler/lib/Runtime.php(159): PHPCompiler\Runtime->compile(Obj in /compiler/lib/Compiler.php on line 60

To reproduce:

docker run ircmaxell/php-compiler:16.04 -r 'class A { public int $i = 0; }'
@ircmaxell
Copy link
Owner

Classes aren't supported yet, so :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants