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

[SOLUTION] Phalcon 4.1.0 - \Profiler::startProfile() must be of the type string, null given #72

Open
OrangeTanguine opened this issue Jan 27, 2021 · 0 comments

Comments

@OrangeTanguine
Copy link
Contributor

Hi !
A new bug with the new version of Phalcon (4.1.0).
You can have this error :

Fatal error: Uncaught TypeError: Argument 1 passed to Snowair\Debugbar\Phalcon\Db\Profiler::startProfile() must be of the type string, null given, called in /data/www/project.com/vendor/snowair/phalcon-debugbar/src/PhalconDebugbar.php on line 710 and defined in /data/www/project.com/vendor/snowair/phalcon-debugbar/src/Phalcon/Db/Profiler.php on line 70

You can read the reason in the changelog of phalcon :
https://github.com/phalcon/cphalcon/blob/master/resources/CHANGELOG-4.1.md
Changed Phalcon\Db\Adapter\*::getRealSQLStatement() to return the full SQL query with parameters #12196

SOLUTION :
/vendor/snowair/phalcon-debugbar/src/PhalconDebugbar.php on line 706 change

 $sql = $db->getRealSQLStatement();

to

$sql = $db->getSQLStatement();

And it works ;-)

See you !

mugi516 added a commit to Nesstech/phalcon-debugbar that referenced this issue Dec 1, 2021
mugi516 added a commit to Nesstech/phalcon-debugbar that referenced this issue Dec 1, 2021
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

1 participant