Skip to content

Commit

Permalink
Correctly handle failing case
Browse files Browse the repository at this point in the history
Issue #11953

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Feb 12, 2016
1 parent 38aba04 commit 9d1a599
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/Error.class.php
Expand Up @@ -425,17 +425,17 @@ public function isUserError()
* prevent path disclosure in error message,
* and make users feel safe to submit error reports
*
* @param string $dest path to be shorten
* @param string $path path to be shorten
*
* @return string shortened path
*/
public static function relPath($dest)
public static function relPath($path)
{
$dest = @realpath($dest);
$dest = @realpath($path);

/* Probably affected by open_basedir */
if ($dest === FALSE) {
return $dest;
return $path;
}

$Ahere = explode(
Expand Down

0 comments on commit 9d1a599

Please sign in to comment.