Ensure reserved environment names aren't changed, fix undefined variable, ref #412
This commit is contained in:
parent
5545075302
commit
43df6533b0
2 changed files with 37 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue