Hi, I'm working on my first website, and this error table occurred. Does anyone know how to fix this? I've seen some guys on StackOverflow dealing with an 'Undefined array key' error in PHP and using this piece of code:
if (isset($lookup_table[$key])) {
return $lookup_table[$key];
}
else {
return;
}
But since I'm really new to this, I'm not sure where I should put it.
PS: I'm using Local.exe for "hosting" while I'm working on it. Could that be a problem?
First up: it's only a warning -- there's nothing actually wrong, but it is a sign that the developer should have been more careful. Because it is coming from a third party I would just ignore it and move on with life; WordPress' ecosystem is full of code that I would describe as "written by junior developers".
If you do want to fix it yourself you'll need to update portfolio-elementor/elementor/elementor-widgets/portfolio_widget.php -- go to line 530 and look for something like $list_of_stuff['pagination_postsperpage'] -- the problem is that $list_of_stuff doesn't have 'pagination_postsperpage' in its list, and is thus generating this warning. You'll want to add "?? null" immediately after the array key reference.
But your change will be lost if the plugin is updated by the author and their update does not include your change. So again, I'd recommend just ignoring it.