Who says?
http://php.net/manual/en/control-structures.foreach.php
"will issue an error when you try to use it on a variable with a different data type or an uninitialized variable."
AFAIR, $actions['EDITS'] is always initialized, even if there are no edits. In this case, foreach body is skipped, without a warning.