In raising this pull request, I confirm the following (please check boxes):
[x] I have read and understood the [Contributing Guidelines][:contrib:]
[x] I have checked that another pull request for this purpose does not exist
[ ] I wrote some tests for this PR
Small description of change:
Fixes issue where
phalcon create-controller --name test
defaults to NULL as the directory where it searches for the config.php file in the wrong place, /, upon not finding it, the code falls back to a recursive directory search logic which then finds the public/webtools.config.php file and loads up the wrong config file causing an error:
PHP Fatal error: Uncaught Error: Call to a member function path() on int in /var/www/repos/phalcon-devtools/scripts/Phalcon/Builder/Controller.php:74
Stack trace:
Hello!
In raising this pull request, I confirm the following (please check boxes):
Small description of change:
Fixes issue where
defaults to NULL as the directory where it searches for the config.php file in the wrong place,
/
, upon not finding it, the code falls back to a recursive directory search logic which then finds thepublic/webtools.config.php
file and loads up the wrong config file causing an error:This can be worked around with:
but the code should not error when not specifying a directory.
Thanks