Ensure reserved environment names aren't changed, fix undefined variable, ref #412

This commit is contained in:
Dane Everitt 2017-05-01 17:01:46 -04:00
parent 5545075302
commit 43df6533b0
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 37 additions and 8 deletions

View file

@ -53,6 +53,30 @@ class ServiceVariable extends Model
'user_editable' => 'integer',
];
/**
* Reserved environment variable names.
*
* @var array
*/
protected static $reservedNames = [
'SERVER_MEMORY',
'SERVER_IP',
'SERVER_PORT',
'ENV',
'HOME',
'USER',
];
/**
* Returns an array of environment variable names that cannot be used.
*
* @return array
*/
public static function reservedNames()
{
return self::$reservedNames;
}
/**
* Returns the display executable for the option and will use the parent
* service one if the option does not have one defined.