i am forced to use a wordpress theme together with my laravel framework. The wordpress theme is around 60 MB of size. Yes, it's ugly.
And no, I will not fix the entire wordpress theme only to avoid that stupid error. That would be bad as well, because if they do an update of the theme, i wouldnt be able to apply it.
Now back to the question, they do
if ($element[0]){
...
}else{
return '';
}
now $element[0]
can be, as expected, undefined. Now this was not a problem, unless it gets called from a laravel context, which i have to do. now the whole thing explodes with:
ErrorException in ga-scroll-event.php line 189: Undefined offset: 0
I repeat, no, i won't go and fix 60 MB of code.
what is the way to disable this error exception ?