cvs: pear /HTTP_Upload Upload.php

From: Date: Mon, 30 Aug 2004 17:47:27 +0000
Subject: cvs: pear /HTTP_Upload Upload.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23509@lists.php.net to get a copy of this message
antonio Mon Aug 30 13:47:27 2004 EDT Modified files: /pear/HTTP_Upload Upload.php Log: bug fix: HTTP_Upload uses strings as error codes http://pear.php.net/bugs/bug.php?id=2252 http://cvs.php.net/diff.php/pear/HTTP_Upload/Upload.php?r1=1.43&r2=1.44&ty=u Index: pear/HTTP_Upload/Upload.php diff -u pear/HTTP_Upload/Upload.php:1.43 pear/HTTP_Upload/Upload.php:1.44 --- pear/HTTP_Upload/Upload.php:1.43 Wed Aug 11 08:52:24 2004 +++ pear/HTTP_Upload/Upload.php Mon Aug 30 13:47:27 2004 @@ -7,7 +7,7 @@ // // ********************************************** // -// $Id: Upload.php,v 1.43 2004/08/11 12:52:24 antonio Exp $ +// $Id: Upload.php,v 1.44 2004/08/30 17:47:27 antonio Exp $ /* * Pear File Uploader class. Easy and secure managment of files @@ -473,6 +473,7 @@ function isMissing() { if (count($this->post_files) < 1) { + echo 111; return $this->raiseError('NO_USER_FILE'); } //we also check if at least one file has more than 0 bytes :) @@ -485,9 +486,10 @@ } } else { //one file $size = $value['size']; + $error = $value['error']; } } - if ($size == 0) { + if ($error != 2 && $size == 0) { $this->raiseError('NO_USER_FILE'); } return false; @@ -576,7 +578,7 @@ $this->HTTP_Upload_Error($lang); $ext = null; - if (empty($name) || $size == 0) { + if (empty($name) || ($error != 'TOO_LARGE' && $size == 0)) { $error = 'NO_USER_FILE'; } elseif ($tmp == 'none') { $error = 'TOO_LARGE';

« previous php.pear.cvs (#23509) next »