//FIX:
$ctop=$corr[$y][$x][2]<=count($sw)?$corr[$y][$x][2]:count($sw);
for ($i=0; $i<$ctop; $i++) {
the problem the array $sw not have a key of $corr[$y][$x][2] so i fix the loop for to max count($sw) to fix ..
I dont know if that create an another consecuense but i resolve my problem y dont have any more errors..
Important: Prefer not using this method, use others. While it works, it is ugly and has its own pitfalls, like falling into the trap of converting real and meaningful output into exceptions.
Normally, you can't catch notices with a simple try-catch block. But there's a hacky and ugly way to do it:
Also, you can use this function for to catch warnings. Just change function name to convert_warning_to_exception and change "<b>Notice</b>:" to "<b>Warning</b>:".
Note: The function will catch normal output that contains:
<b>Notice</b>:
To escape from this problem, simply, change it to:
PHP Notice: unserialize(): Error at offset 191 of 285 bytes in ...
and are getting the data from a database, Make sure that you have the database set the the correct encoding, I had the database set as latin1_swedish_ci and all of the data looked perfect, Infact when i copied it into a online unserialize it worked fine. I changed the collation to utf8mb4_unicode_ci and all worked fine.