Ensure stripos() receives a string
If file_get_contents() returns false, stripos() will throw a TypeError. Casting to string prevents this from happening. Closes #11470pull/11475/head
parent
e51d755a08
commit
9885d23e2a
|
@ -148,7 +148,7 @@ class Platform
|
|||
if (
|
||||
!ini_get('open_basedir')
|
||||
&& is_readable('/proc/version')
|
||||
&& false !== stripos(Silencer::call('file_get_contents', '/proc/version'), 'microsoft')
|
||||
&& false !== stripos((string)Silencer::call('file_get_contents', '/proc/version'), 'microsoft')
|
||||
&& !file_exists('/.dockerenv') // docker running inside WSL should not be seen as WSL
|
||||
) {
|
||||
return self::$isWindowsSubsystemForLinux = true;
|
||||
|
|
Loading…
Reference in New Issue