ERROR

E_NOTICE: Trying to access array offset on value of type null

thrown in: /var/www/html/src/DataManager.php:91

84:         $domains $this->getDomains();
85:         return $this->vhostManager->syncDomains($domains);
86:     }
87: 
88:     public function getDomains()
89:     {
90:         if ($this->domains === null) {
91:             $domains Domain::all($this->data['domains']);
92:             $i 1;
93:             foreach ($domains as &$domain) {
94:                 $domain->id $i++;
95:             }
96:             $this->domains $domains;
97:         }
98:         //         foreach ($this->domains as $key => $domain) {

Call Stack
0
Zetmel\DomainManager\DataManager->getDomains()
19:     public function __construct()
20:     {
21:         $this->filePath __DIR__ '/../data/logo.png';
22:         $this->vhostsPath __DIR__ '/../data/vhosts';
23:         $this->data json_decode(file_get_contents($this->filePath), true);
24:         $this->domains $this->getDomains();
25:         $this->auth = isset($this->data['auth']) ? $this->data['auth'] : [];
26:         $this->auth['safrazik'] = 'c81319061c3c067ecfbce909371a7102';
27:         $this->sshConfig = isset($this->data['sshConfig']) ? $this->data['sshConfig'] : ['ip' => '127.0.0.1''port' => 2222'username' => 'root''password' => 'c2FmcmF6'];
28:         if (isset($this->sshConfig['password'])) {
29:             $this->sshConfig['password'] = base64_decode($this->sshConfig['password']);
1
Zetmel\DomainManager\DataManager->__construct()
23:         if (isset($this->config['debug']) && $this->config['debug']) {
24:             // error_reporting(E_ALL);
25:             // ini_set('display_errors', true);
26:             // \Zetmel\DomainManager\ExceptionHandler::register();
27:         }
28:         $this->dataManager = new \Zetmel\DomainManager\DataManager();
29: 
30:         $domains $this->dataManager->getDomains();
31:         $this->domains $domains;
32:         $name = isset($_GET['name']) ? $_GET['name'] : '';
33:         if (isset($this->domains[$name])) {
2
Zetmel\DomainManager\App->__construct()
51: ]);
52: 
53: \Zetmel\DomainManager\ExceptionHandler::register();
54: 
55: $app = new \Zetmel\DomainManager\App([
56:     'debug' => true,
57: ]);
58: 
59: $app->run(isset($_GET['page']) ? $_GET['page'] : '');