with warning, I mean warnings that are not important or breaking, and not wrong code per say.
for example, imagine I have a search page.
$query, $items (as in how many items to display)
and I would still supply the page with only $query, and I would use some default value for $items.
Now, since my code is basically
$query = $_GET["query"];
$items = $_GET["items"];
after this I can write such code to show items,
if (empty($items))
//show default number of items
else
//show set amount of items
Of course I would need to check if items is not number and stuff like that, but the basic idea is this.
This obviously throws warning "items" is not set. To fix this, before doing $items, I can check if "items" exists, and maybe if it exists set it to that amount and if not the default amount. This would throw nothing. However this only makes my code either longer or just the same logic at different place. I would still need to check if $items is number and tons of other stuff anyway, its not only one check either, although it is still short in this case. At best case, I would end with basically same thing in different place.
So what should I do? Make php ignore warnings for error_log ? Or should I make sure this errors never happen even if it doesnt change how the code works and make my "uglier" ?
Are warnings, warnings or just suggestions?