[BUGFIX] Remove PHP warning if variables argument is NULL

In some case argument $variables is NULL and raises a PHP warning:
Invalid argument supplied for foreach()