mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
chore(legacy): deprecate OC_Util::runningOnMac()
- Easy enough query directly these days; Only used in one spot anyhow - Updated the runningOnMac method to use PHP_OS_FAMILY just for clarity until we can remove the function entirely (same result; supported since PHP ~7.4). Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
756efb76aa
commit
cc873ccaec
1 changed files with 6 additions and 2 deletions
|
|
@ -733,12 +733,16 @@ class OC_Util {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks whether the server is running on Mac OS X
|
||||
* Checks whether PHP is running directly on macOS.
|
||||
*
|
||||
* Note: In a Linux container, this will be false even on a macOS host
|
||||
* (PHP just sees "Linux").
|
||||
*
|
||||
* @return bool true if running on Mac OS X, false otherwise
|
||||
* @deprecated 33.0.0 Query PHP_OS_FAMILY directly.
|
||||
*/
|
||||
public static function runningOnMac() {
|
||||
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
|
||||
return (PHP_OS_FAMILY === 'Darwin');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue