How to fix undefined array key (php 8 error)

spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 834310
    • Gender:Male
  • point d’amour
How to fix undefined array key (php 8 error)

For example if you have something like
Code: [Select]
$Datum = $review["ReviewDate"];Change to
Code: [Select]
$Datum = $review["ReviewDate"] ?? null;or
Code: [Select]
$Datum = $review["ReviewDate"] ?? "";
performance - PHP: Fastest way to handle undefined array key - Stack Overflow


 

Search Tools