[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()
Merge pull request #6 from fudriot/bugfix-warning-if-attributes-is-null

[BUGFIX] Remove PHP warning if variables argument is NULL