You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* Validate if the system is based on windows or not.
*
* @return bool
*/
public function isWindows()
{
$keys = [
'CYGWIN_NT-5.1',
'WIN32',
'WINNT',
'Windows'
];
return in_array(PHP_OS, $keys);
}
another option would be:
protected function isWin()
{
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
return true;
}
return false;
}
or with DIRECTORY_SEPERATOR which is \ on windows
The text was updated successfully, but these errors were encountered:
in
grav/system/src/Grav/Console/ConsoleTrait.php
Line 120 in 7710cba
array_key_exists
vsin_array
the code should be
another option would be:
or with
DIRECTORY_SEPERATOR
which is\
on windowsThe text was updated successfully, but these errors were encountered: