From 73db141ce679ac85dd7dfff725a9ace801a90104 Mon Sep 17 00:00:00 2001 From: Kris Wallsmith Date: Fri, 18 Mar 2011 11:11:42 -0700 Subject: [PATCH] [HttpFoundation] stripped tags from native error messages in case html_errors is on --- src/Symfony/Component/HttpFoundation/File/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/File/File.php b/src/Symfony/Component/HttpFoundation/File/File.php index 75c5eb27d5..4675332e17 100644 --- a/src/Symfony/Component/HttpFoundation/File/File.php +++ b/src/Symfony/Component/HttpFoundation/File/File.php @@ -611,7 +611,7 @@ class File { if (false === $size = @filesize($this->getPath())) { $error = error_get_last(); - throw new FileException(sprintf('Could not read file size of %s (%s)', $this->getPath(), $error['message'])); + throw new FileException(sprintf('Could not read file size of %s (%s)', $this->getPath(), strip_tags($error['message']))); } return $size; @@ -631,7 +631,7 @@ class File if (!@rename($this->getPath(), $newPath)) { $error = error_get_last(); - throw new FileException(sprintf('Could not move file %s to %s (%s)', $this->getPath(), $newPath, $error['message'])); + throw new FileException(sprintf('Could not move file %s to %s (%s)', $this->getPath(), $newPath, strip_tags($error['message']))); } $this->path = realpath($newPath);