Fix issue when no apps are enabled

Properly initialize $apps array

Fixes #9770 

Note: this only happens if ZERO app is enabled.

Please review @tomneedham @MorrisJobke @schiesbn @MorrisJobke