summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2011-12-19 11:05:41 +0100
committerAndrey Andreev <narf@bofh.bg>2011-12-19 11:05:41 +0100
commit4eea9895e8ced75a1099c56215c09773de94b92c (patch)
treedeede09895f2470d89bb715f1590a299ca7b4ed3 /system/libraries/Upload.php
parentd054e137917ef1131195679aa8abeb4dbf69e4e4 (diff)
Add method visibility declarations and optimize display_errors() method in Image_lib, Trackback and Upload libraries
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 66e91c5b6..ab97d1a0f 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -934,13 +934,7 @@ class CI_Upload {
*/
public function display_errors($open = '<p>', $close = '</p>')
{
- $str = '';
- foreach ($this->error_msg as $val)
- {
- $str .= $open.$val.$close;
- }
-
- return $str;
+ return (count($this->error_msg) > 0) ? $open . implode($close . $open, $this->error_msg) . $close : '';
}
// --------------------------------------------------------------------
@@ -1086,4 +1080,4 @@ class CI_Upload {
// END Upload Class
/* End of file Upload.php */
-/* Location: ./system/libraries/Upload.php */ \ No newline at end of file
+/* Location: ./system/libraries/Upload.php */