Reputation: 59
I'm working with one array that have 55 elements inside and each one are another array with 17 elements each one.
When I show the array on the screen, nothing wrong happens but when I take a look in the page source, I have 55 x 17 "Severity: Notice" errors with the message "Undefined index".
Does someone know what can be wrong?
If the index really doesn't exist, I couldn't see the array on the screen.
I tested using if ( isset( ) ) { ... }
, but still the same.
Codeigniter version: 1.7.2
Browsers tested: firefox, chrome, ie and safari.
Upvotes: 0
Views: 382
Reputation: 2273
I usually get this errors when I'm trying to echo something that is not defined. It's not an PHP error, only a notice. This is produced by the function error_reporting(); on the main index.php.
If you open this index.php file, you will see:
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI runs with error reporting set to ALL. For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit: http://www.php.net/error_reporting
|
*/
error_reporting(E_ALL);
You've two options:
error_reporting(E_ALL & ~E_NOTICE);
.Wish this helps you!
Upvotes: 1
Reputation: 4196
This has nothing to do with CI or your browser, it is a classic PHP notice.
Upvotes: 0