CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

please help codeigniter

Open Sbukeyz opened this issue 1 year ago • 3 comments

A PHP Error was encountered Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Admin.php

Line Number: 30

Backtrace:

File: C:\xampp\htdocs\projectM\application\controllers\Admin.php Line: 30 Function: _error_handler

File: C:\xampp\htdocs\projectM\index.php Line: 315 Function: require_once

A PHP Error was encountered Severity: Notice

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

Filename: controllers/Admin.php

Line Number: 30

Backtrace:

File: C:\xampp\htdocs\projectM\application\controllers\Admin.php Line: 30 Function: _error_handler

File: C:\xampp\htdocs\projectM\index.php Line: 315 Function: require_once

Sbukeyz avatar Apr 14 '23 09:04 Sbukeyz

You must ask this question on the forum.

mohammadhzp avatar Apr 21 '23 12:04 mohammadhzp

@Sbukeyz, You need to use isset to check if item is present in array, before retrieve data.

if(isset($array($item))) { 
     $data = $array[$item]; 
} 

euginepj avatar Apr 27 '23 13:04 euginepj

@Sbukeyz To fix the error, you will need to look at the code on line 30 and figure out what is causing the issue. You may need to check if the array is defined and if the element you're trying to access exists. Additionally, you may need to make sure that any variables you're using have been initialized before you try to access them.

tal7aouy avatar May 14 '23 12:05 tal7aouy