Skip to content

Commit

Permalink
Avoid PHP warning in fopen, fixes #6296
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Feb 6, 2014
1 parent 8407163 commit 34b9205
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/debug/arWebDebugPanel.class.php
Expand Up @@ -52,7 +52,8 @@ protected function getCurrentGitRevision()
{
$gitDirectory = sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'.git'.DIRECTORY_SEPARATOR;
$headFile = $gitDirectory.'HEAD';
if (false !== $fd = fopen($headFile, 'r'))
// Use at sign to avoid unnecessary warning
if (false !== $fd = @fopen($headFile, 'r'))
{
$line = fgets($fd);
fclose($fd);
Expand Down

0 comments on commit 34b9205

Please sign in to comment.