Skip to content

Commit

Permalink
Fixes #6314 do not display error Warning: shell_exec() [function.shel…
Browse files Browse the repository at this point in the history
…l-exec]: Unable to execute 'stat -f -c "%T" /proc 2>/dev/null
  • Loading branch information
mattab committed Oct 1, 2014
1 parent 2e38d64 commit f080302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/CliMulti/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private static function isProcFSMounted()
}
// Testing if /proc is a resource with @fopen fails on systems with open_basedir set.
// by using stat we not only test the existance of /proc but also confirm it's a 'proc' filesystem
$type = shell_exec('stat -f -c "%T" /proc 2>/dev/null');
$type = @shell_exec('stat -f -c "%T" /proc 2>/dev/null');
return strpos($type, 'proc') === 0;
}

Expand Down

1 comment on commit f080302

@diosmosis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using error silencing, it might be better to catch PHP errors so they can be logged (see https://github.com/piwik/plugin-LoginLdap/blob/master/Ldap/Client.php#L201).

Please sign in to comment.