[SOLVED] Error with library file after upgrade from 3.0.3.9 to 3.0.4.0
Posted: Mon Mar 03, 2025 2:26 am
After upgrading my library file stopped working. Every page that calls this function all of a sudden stopped working. It's like the library file is no longer registered. All functions being called from this file no longer work. No changes were made except for the version upgrade. I don't know why, and I don't know what info you need to help.
Error:
This is the way the library file is structured:
This is the call to the function:
Error:
Code: Select all
[02-Mar-2025 12:32:00 America/New_York] PHP Fatal error: Uncaught Error: Call to a member function track() on null in /PATH/storage/modification/admin/controller/common/login.php:134
Stack trace:
#0 /PATH/modification/admin/controller/common/login.php(14): ControllerCommonLogin->validate()
#1 /PATH/modification/system/engine/action.php(79): ControllerCommonLogin->index()
#2 /PATH/controller/startup/router.php(26): Action->execute(Object(Registry), Array)
#3 /PATH/storage/modification/system/engine/action.php(79): ControllerStartupRouter->index()
#4 /PATH/storage/modification/system/engine/router.php(77): Action->execute(Object(Registry))
#5 /PATH/storage/modification/system/engine/router.php(66): Router->execute(Object(Action))
#6 /PATH/system/framework.php(179): Router->dispatch(Object(Action), Object(Action))
#7 /PATH/system/startup.php(104): require_once('/PATH/system/framework.php')
#8 /PATH/index.php(19): start('admin')
#9 {main}
thrown in /PATH/storage/modification/admin/controller/common/login.php on line 134
This is the way the library file is structured:
Code: Select all
<?php
class Guard {
private $data = array();
private $config;
private $session;
private $db;
private $registry;
private $customer;
private $htaccess_block;
//protected $registry;
public function __construct($registry) {
$this->registry = $registry;
$this->config = $registry->get('config');
$this->db = $registry->get('db');
$this->request = $registry->get('request');
$this->session = $registry->get('session');
$this->log = $registry->get('log');
$this->customer = $registry->get('customer');
}
public function __get($name) {
return $this->registry->get($name);
}
public function track($name, $interaction, $location) {
}
}
?>
Code: Select all
$name = $this->request->post['name_al'] ?? "";
$hi2 = $this->request->post['hi_al'] ?? "";
$return = $this->Guard->track($name, $hi2, "Data");