Error using Fuelphp in version 7

Asked

Viewed 66 times

2

I wonder if anyone has ever encountered a similar error when using the Fuelphp framework, in version 1.7 with PHP 7.

This is popping the following message, before entering the application:

  Fatal error: Uncaught Error: Call to undefined method Error::error_handler() in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php:100 Stack trace: #0 C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php(43): {closure}(8, 'Undefined varia...', 'C:\\xampp\\htdocs...', 43, Array) #1 [internal function]: {closure}() #2 {main} thrown in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php on line 100

After logging into the application:

Fatal error: Uncaught Error: Call to undefined method Error::exception_handler() in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php:84 Stack trace: #0 [internal function]: {closure}(Object(Fuel\Core\Database_Exception)) #1 {main} thrown in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php on line 84

Fatal error: Uncaught Error: Call to undefined method Error::error_handler() in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php:100 Stack trace: #0 C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php(43): {closure}(8, 'Undefined varia...', 'C:\\xampp\\htdocs...', 43, Array) #1 [internal function]: {closure}() #2 {main} thrown in C:\xampp\htdocs\arquivo\fuel\core\bootstrap.php on line 100

Stacktrace of bootstrap.php

set_exception_handler(function (\Exception $e)
{
    // reset the autoloader
    \Autoloader::_reset();

    // deal with PHP bugs #42098/#54054
    if ( ! class_exists('Error'))
    {
        include COREPATH.'classes/error.php';
        class_alias('\Fuel\Core\Error', 'Error');
        class_alias('\Fuel\Core\PhpErrorException', 'PhpErrorException');
    }

    return \Error::exception_handler($e);
});

set_error_handler(function ($severity, $message, $filepath, $line)
{
    // reset the autoloader
    \Autoloader::_reset();

    // deal with PHP bugs #42098/#54054
    if ( ! class_exists('Error'))
    {
        include COREPATH.'classes/error.php';
        class_alias('\Fuel\Core\Error', 'Error');
        class_alias('\Fuel\Core\PhpErrorException', 'PhpErrorException');
    }

    return \Error::error_handler($severity, $message, $filepath, $line);
});

I came to see this link, but it didn’t help me much =/

https://github.com/fuel/core/issues/1942.


At first the application was mounted on top of php 5.6.*.

Database is running all right.

1 answer

2


  • Thanks for the information :D. It helped me a lot. So there will be many changes from one version to the other. I need to make few changes. I will use old version for now.

  • 1

    @Juliocesarsouza is good to keep up to date. It has new features but nothing that will break what already exists as it is a minor version.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.