MyBB Community Forums

Full Version: Catchable Fatal Error (4096)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB Internal Error
MyBB has experienced an internal error and cannot continue.

Error Type:
            Catchable Fatal Error (4096)
Error Message:
            Object of class MyBB could not be converted to string
Location:
            File: global.php(956) : eval()'d code
            Line: 5
Backtrace:
/inc/class_error.php                              208        errorHandler->output_error
/global.php(956) : eval()'d code             5            errorHandler->error
/global.php                                          956         eval
/index.php                                           18           require_once


This error occurs when i use this script:
$(document).ready(function () {
            var urlAvatar = $mybb -> user['avatar'] ? $mybb -> user['avatar'] : 'images/default_avatar.png';
            var setAvatar = document.getElementById('user-image').setAttribute('src', urlAvatar);
            return;
        });