Я использую следующий код в PHP, чтобы проверить, заполнен ли массив.
Код: Выделить всё
if (@sizeof($mediaArray) > 0) {
Do something
}
Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given in...
In php7 this was no problem. What can I do to fix this? How can I check if an Array is not empty?
Источник: https://stackoverflow.com/questions/781 ... i-fix-this
Мобильная версия