Whoops \ Exception \ ErrorException (E_WARNING)
Trying to access array offset on false Whoops\Exception\ErrorException thrown with message "Trying to access array offset on false" Stacktrace: #9 Whoops\Exception\ErrorException in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php:278 #8 Whoops\Run:handleError in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php:278 #7 CI_Cache_file:_get in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php:82 #6 CI_Cache_file:get in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/Core/core/View/Plates.php:546 #5 Base\View\Plates:compile in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/Core/core/View/Plates.php:376 #4 Base\View\Plates:view in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/Core/helpers/plate_helper.php:59 #3 view in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/Core/helpers/plate_helper.php:193 #2 layout in /home/juxbuyc7/web.juxbuy.com/app/Web/App/Controllers/App.php:16 #1 App:index in /home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/CodeIgniter/Framework/core/CodeIgniter.php:590 #0 require_once in /home/juxbuyc7/web.juxbuy.com/public/index.php:105
Stack frames (10)
9
Whoops\Exception\ErrorException
/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php278
8
Whoops\Run handleError
/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php278
7
CI_Cache_file _get
/vendor/sylynder/engine/CodeIgniter/Framework/libraries/Cache/drivers/Cache_file.php82
6
CI_Cache_file get
/vendor/sylynder/engine/Core/core/View/Plates.php546
5
Base\View\Plates compile
/vendor/sylynder/engine/Core/core/View/Plates.php376
4
Base\View\Plates view
/vendor/sylynder/engine/Core/helpers/plate_helper.php59
3
view
/vendor/sylynder/engine/Core/helpers/plate_helper.php193
2
layout
/app/Web/App/Controllers/App.php16
1
App index
/vendor/sylynder/engine/CodeIgniter/Framework/core/CodeIgniter.php590
0
require_once
/public/index.php105
    // ------------------------------------------------------------------------
 
    /**
     * Get all data
     *
     * Internal method to get all the relevant data about a cache item
     *
     * @param    string    $id    Cache ID
     * @return    mixed    Data array on success or false on failure
     */
    protected function _get($id)
    {
        if ( ! is_file($this->_cache_path.$id))
        {
            return false;
        }
 
        $data = unserialize(file_get_contents($this->_cache_path.$id));
 
        if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
        {
            file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id);
            return false;
        }
 
        return $data;
    }
 
}
 
Arguments
  1. "Trying to access array offset on false"
    
    // ------------------------------------------------------------------------
 
    /**
     * Get all data
     *
     * Internal method to get all the relevant data about a cache item
     *
     * @param    string    $id    Cache ID
     * @return    mixed    Data array on success or false on failure
     */
    protected function _get($id)
    {
        if ( ! is_file($this->_cache_path.$id))
        {
            return false;
        }
 
        $data = unserialize(file_get_contents($this->_cache_path.$id));
 
        if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
        {
            file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id);
            return false;
        }
 
        return $data;
    }
 
}
 
     */
    public function __construct()
    {
        $CI =& get_instance();
        $CI->load->helper('file');
        $path = $CI->config->item('cache_path');
        $this->_cache_path = ($path === '') ? CACHE_PATH : $path;
    }
 
    // ------------------------------------------------------------------------
 
    /**
     * Fetch from cache
     *
     * @param    string    $id    Cache ID
     * @return    mixed    Data on success, false on failure
     */
    public function get($id)
    {
        $data = $this->_get($id);
        return is_array($data) ? $data['data'] : false;
    }
 
    // ------------------------------------------------------------------------
 
    /**
     * Save into cache
     *
     * @param    string    $id    Cache ID
     * @param    mixed    $data    Data to store
     * @param    int    $ttl    Time to live in seconds
     * @param    bool    $raw    Whether to store the raw value (unused)
     * @return    bool    true on success, false on failure
     */
    public function save($id, $data, $ttl = 60, $raw = false)
    {
        $contents = [
            'time'        => time(),
            'ttl'        => $ttl,
            'data'        => $data
    // --------------------------------------------------------------------------
 
    /**
     *  Compiles a template and saves it in the cache
     */
    protected function compile(string $template): string
    {
        $viewPath    = $this->exists($template, true);
        $cacheName    = md5((string) $viewPath) . $this->cacheExtension;
        $platesPath = $this->ci->config->item('plates_cache_path') . DIRECTORY_SEPARATOR;
        
        $this->viewPath = $viewPath;
        $this->cacheName = $cacheName;
        $this->platesPath = $platesPath;
        
        // Save cached files to cache/web/plates folder
        $this->ci->config->set_item('cache_path', $platesPath);
 
        //    Verifies if a cached version of the file exists
        if ($cachedVersion = $this->ci->cache->file->get($cacheName)) {
            if (ENVIRONMENT == 'production') {
                return $cachedVersion;
            }
 
            $cachedMeta = $this->ci->cache->file->get_metadata($cacheName);
 
            if ($cachedMeta['mtime'] > filemtime($viewPath)) {
                return $cachedVersion;
            }
        }
 
        $content = file_get_contents($viewPath);
 
        //    Compile the content
        foreach ($this->compilers as $compiler) {
            $method = sprintf('compile_%s', $compiler);
            $content = $this->$method($content);
        }
 
        //    Store in the cache
        return $this;
    }
 
    // --------------------------------------------------------------------------
 
    /**
     *  Outputs template content
     *
     *  @param    array     $data
     * 
     *  @return   string
     */
    public function view(string $template, $data = null, bool $return = false)
    {
        if (isset($data)) {
            $this->set($data);
        }
 
        //    Compile and execute the template
        $content = $this->run($this->compile($template), $this->plateData);
 
        if (config_item('compress_content')) {
            $content = $this->minifyHtml($content);
        }
 
        if (!$return) {
            $this->ci->output->append_output($content);
        }
 
        return $content;
    }
 
    /**
     * Minify compiled html
     *
     * @return string
     */
    protected function minifyHtml(string $content, bool $removeComments = true)
    {
        $commentCount = null;
     * @param array $view_data
     * @param bool $return 
     * @return object|string
     */
    function view($view_path, $view_data = [], $return = false)
    {
        $view_path = dot2slash($view_path);
 
        if (config('view')['view_engine'] === '') {
            return app()->use->view($view_path, $view_data, $return);
        }
 
        // Get the evaluated view contents for the given plates view
        if (config('view')['view_engine'] === 'plates')  {
 
            if ($view_data === null) {
                return plates()->view($view_path, $return);
            }
 
            return plates()->set($view_data)->view($view_path, $return);
        }
 
        // Render view blade views
        if (config('view')['view_engine'] === 'blade') {
 
            if (!function_exists('blade')) {
                throw new \Exception("Make sure Blade/View Package is installed");
            }
 
            return blade()->view($view_path, $view_data);
        }
 
        // Fall on plates to render view
        return plates()->set($view_data)->view($view_path, $return);
        
    }
}
 
if ( ! function_exists('blade')) 
{
    /**
     * Load views in a layout format
     *
     * @param string $layout_path
     * @param string $view_path
     * @param array $view_data
     * @return string
     */
    function layout(
        $layout_path, 
        $view_path = null, 
        $view_data = null
    ) {
 
        if (! is_null($view_path) && isset($view_path) )
        {
            $view_data['content'] = $view_path;
        }
 
        return view($layout_path, $view_data);
    }
}
 
<?php
 
use App\Enums\UserType;
use App\Middleware\WebMiddleware;
 
class App extends WebMiddleware
{
    public function __construct()
    {
        parent::__construct();
    }
 
    public function index()
    {
        $this->setTitle('Home');
        return layout('website.layouts.home', 'website.pages.index', $this->data);
    }
 
    public function why()
    {
        $this->setTitle('Why JuxBuy');
        return layout('website.layouts.main', 'website.pages.why', $this->data);
    }
 
    public function pricing()
    {
        $this->setTitle('Pricing');
        return layout('website.layouts.main', 'website.pages.pricing', $this->data);
    }
 
    public function learn()
    {
        $this->setTitle('Learn');
        return layout('website.layouts.main', 'website.pages.learn', $this->data);
    }
 
    public function login()
    {
        $this->setTitle('Login');
 
 * ------------------------------------------------------
 */
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_( ' . $class . ' / ' . $method . ' )_start');
 
$CI = new $class();
 
/*
 * ------------------------------------------------------
 *  Is there a "post_controller_constructor" hook?
 * ------------------------------------------------------
 */
$EXT->call_hook('post_controller_constructor');
 
/*
 * ------------------------------------------------------
 *  Call the requested method
 * ------------------------------------------------------
 */
call_user_func_array([&$CI, $method], $params);
 
// Mark a benchmark end point
$BM->mark('controller_execution_time_( ' . $class . ' / ' . $method . ' )_end');
 
/*
 * ------------------------------------------------------
 *  Is there a "post_controller" hook?
 * ------------------------------------------------------
 */
$EXT->call_hook('post_controller');
 
/*
 * ------------------------------------------------------
 *  Send the final rendered output to the browser
 * ------------------------------------------------------
 */
if ($EXT->call_hook('display_override') === false) {
    $OUT->_display();
}
 
            error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
        } else {
            error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
        }
        break;
 
    default:
        header('HTTP/1.1 503 Service Unavailable.', true, 503);
        echo 'The application environment is not set correctly.';
        exit(1); // EXIT_ERROR
}
 
/*
 * --------------------------------------------------------------------
 * LOAD CODEIGNITER BOOTSTRAP FILE
 * --------------------------------------------------------------------
 *
 * And away we go...
 */
require_once CIPATH . 'core/CodeIgniter.php';
 
Arguments
  1. "/home/juxbuyc7/web.juxbuy.com/vendor/sylynder/engine/CodeIgniter/Framework/core/CodeIgniter.php"
    

Environment & details:

empty
empty
empty
Key Value
PHPSESSID
"akvfop47a4nbdm2l44f7u65fo5"
empty
empty
empty
0. Whoops\Handler\CallbackHandler
1. WhoopsErrorOutput