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

The detailed mode for Phalcon/Debug is not work #13315

limingxinleo opened this Issue Mar 8, 2018 · 2 comments


None yet
2 participants

limingxinleo commented Mar 8, 2018

When I use Phalcon/Debug detailed mode,The result is not expected.

        $obj = new \stdClass();
        $obj->aaa = 111;

        array_map(function ($x) {
            $string = (new \Phalcon\Debug\Dump(null, true))->variable($x);

            echo(PHP_SAPI == 'cli' ? strip_tags($string) . PHP_EOL : $string);

        }, [$obj]);

The Result

The argument is not initialized or iterable() code:0 in phalcon/debug/dump.zep line 215
#0 [internal function]: Phalcon\Debug\Dump->output(Object(stdClass), '')
#1 /Users/limx/Applications/limingxinleo/basic-phalcon/app/Tasks/TestTask.php(16): Phalcon\Debug\Dump->variable(Object(stdClass))
#2 [internal function]: App\Tasks\TestTask->App\Tasks\{closure}(Object(stdClass))
#3 /Users/limx/Applications/limingxinleo/basic-phalcon/app/Tasks/TestTask.php(20): array_map(Object(Closure), Array)
#4 [internal function]: App\Tasks\TestTask->mainAction(Array, Array)
#5 [internal function]: Phalcon\Cli\Dispatcher->callActionMethod(Object(App\Tasks\TestTask), 'mainAction', Array)
#6 [internal function]: Phalcon\Dispatcher->dispatch()
#7 /Users/limx/Applications/limingxinleo/basic-phalcon/vendor/limingxinleo/x-phalcon-console/src/Cli/XConsole.php(36): Phalcon\Cli\Console->handle(Array)
#8 /Users/limx/Applications/limingxinleo/basic-phalcon/run(47): Xin\Phalcon\Cli\XConsole->handle(Array)
#9 {main}%

I find the source code for Phalcon/Debug/Dump, using for instead of each, for is not support object, so it throw a exception, but each is deprecated for php7.2.


  • Phalcon version: (3.3.2)
  • PHP Version: (7.1.14)
  • Operating System: MAC
  • Installation type: Compiling from source || installing via package manager
  • Zephir version (if any):
  • Server: Nginx | Apache | Other
  • Other related info (Database, table schema):

This comment has been minimized.


sergeyklay commented Mar 26, 2018

This issue introduced in 39091bf

cc: @jmsfwk


This comment has been minimized.


sergeyklay commented Mar 26, 2018

Fixed in the 3.4.x branch. Feel free to open a new issue if the problem appears again. Thank you for contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment