theodo / TheodoEvolutionLegacyWrapperBundle

40 stars 24 forks source link

CodeIgniter 3.0.0 and Symfony2 #30

Open granith opened 8 years ago

granith commented 8 years ago

I always get this error message when trying to implement wrapper for Symfony 2.8:

Fatal error: Call to a member function getMessage() on integer in C:\xampp\htdocs\hmadmin\system\core\Common.php on line 654

benja-M-1 commented 8 years ago

@granith can you show the code or add a link to the problematic line?

granith commented 8 years ago

` function _exception_handler($exception) {

    $_error =& load_class('Exceptions', 'core');
    **$_error->log_exception('error', 'Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine());**

    // Should we display the error?
    if (str_ireplace(array('off', 'none', 'no', 'false', 'null'), '', ini_get('display_errors')))
    {
        $_error->show_exception($exception);
    }

    exit(1); // EXIT_ERROR
}`

I have made with asterisk (**) problematic line.

benja-M-1 commented 8 years ago

@granith thanks! My hypothesis is that the error handler of CodeIgniter is in conflict with the one of Symfony. You should use a debugger to understand why an integer is passed to this function.

Can you paste the stack trace?