[BUGFIX] Remove PHP warning if variables argument is NULL

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