mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 09:06:19 +00:00
fix windows warnings in sync
This commit is contained in:
parent
3251199ef1
commit
d20ef06ba0
1 changed files with 5 additions and 5 deletions
|
@ -106,14 +106,14 @@ class Sync{
|
||||||
|
|
||||||
if ($OS == 2) {
|
if ($OS == 2) {
|
||||||
$processes = explode( "\n", shell_exec( "tasklist.exe" ));
|
$processes = explode( "\n", shell_exec( "tasklist.exe" ));
|
||||||
foreach( $processes as $process )
|
foreach( $processes as $key => $value )
|
||||||
{
|
{
|
||||||
if( strpos( "Image Name", $process ) === 0
|
if( empty($value) != '1' && strpos( "Image Name", $value ) === 0
|
||||||
|| strpos( "===", $process ) === 0 )
|
|| empty($value) != '1' && strpos( "===", $value ) === 0 )
|
||||||
continue;
|
continue;
|
||||||
$matches = false;
|
$matches = false;
|
||||||
preg_match( "/(.*?)\s+(\d+).*$/", $process, $matches );
|
preg_match( "/(.*?)\s+(\d+).*$/", $value, $matches );
|
||||||
if ($pid = $matches[ 2 ]) {
|
if (isset($matches[ 2 ]) && $pid = $matches[ 2 ]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue