Closed EddyBeaupre closed 6 years ago
I am aware of this issue and will be pushing a fix with the new update soon.
As PHP progresses in versions we have to take extra steps to prevent these errors.
What is your server's setup? OS, Apache, PHP, version etc...
The code related to this error is as follows:
/** Check the following Directory for classes and methods **/
$directory = APPDIR.'Controllers';
$scanned_directory = array_diff(scandir($directory), array('..', '.'));
/** Extract the methods from the classes **/
foreach ($scanned_directory as $filename) {
/** Remove the .php from the files names to get Class Names **/
$class = str_replace('.php', '', str_replace('-', ' ', $filename));
/** Get array of class methods **/
$class_methods = get_class_methods('App\\Controllers\\'.$class);
/** Remove blank and __construct methods from array **/
if($class_methods[0] == ""){
unset($class_methods[0]);
}
if($class_methods[0] == "__construct"){
unset($class_methods[0]);
}
if($class_methods[1] == "__construct"){
unset($class_methods[1]);
}
foreach ($class_methods as $method) {
if(checkCoreRoutes($class, $method)){
$routes[] = array(
"controller" => $class,
"method" => $method
);
}
}
}
Try the following and let me know what the result is:
/** Check the following Directory for classes and methods **/
$directory = APPDIR.'Controllers';
$scanned_directory = array_diff(scandir($directory), array('..', '.'));
/** Extract the methods from the classes **/
if(isset($scanned_directory)){
foreach ($scanned_directory as $filename) {
/** Remove the .php from the files names to get Class Names **/
$class = str_replace('.php', '', str_replace('-', ' ', $filename));
/** Get array of class methods **/
$class_methods = get_class_methods('App\\Controllers\\'.$class);
/** Remove blank and __construct methods from array **/
if($class_methods[0] == ""){
unset($class_methods[0]);
}
if($class_methods[0] == "__construct"){
unset($class_methods[0]);
}
if($class_methods[1] == "__construct"){
unset($class_methods[1]);
}
foreach ($class_methods as $method) {
if(checkCoreRoutes($class, $method)){
$routes[] = array(
"controller" => $class,
"method" => $method
);
}
}
}
}
Ubuntu 16.04.4 LTS Apache/2.4.18 (Ubuntu) PHP 7.0.28-0ubuntu0.16.04.1
For an unknown reason it work not and i didn't change anything to the setup.... Weird
When trying to access the System Routes admin pannel on a brand new installation, you get the following error:
errors/php-error.log report the following:
Apache doesn't log any other errors.