Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please help codeigniter #6209

Open
Sbukeyz opened this issue Apr 14, 2023 · 3 comments
Open

please help codeigniter #6209

Sbukeyz opened this issue Apr 14, 2023 · 3 comments

Comments

@Sbukeyz
Copy link

Sbukeyz commented Apr 14, 2023

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 Sbukeyz changed the title please help please help codeigniter Apr 14, 2023
@mohammadhzp
Copy link

You must ask this question on the forum.

@euginepj
Copy link

euginepj commented Apr 27, 2023

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

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

@tal7aouy
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants