Repository navigation
v3.35 - Fix count() error for null json_decode
Fixed
- count() Error:
count(): Argument #1 ($value) must be of type Countable|array, null given
Root Cause
json_decode() returns null when it encounters invalid JSON (e.g., HTML-encoded strings like "). The code was passing this null value directly to count().
Fix
Added null-safe defaults using the null coalescing operator:
$images = json_decode($imagesRaw ?: '[]', true) ?: [];Applied to all three option types: images, flavors, and disks.