mirror of
https://github.com/e107inc/e107.git
synced 2025-07-23 16:01:39 +02:00
Make file size decode more tolerant
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/upload_handler.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/upload_handler.php,v $
|
||||||
| $Revision: 1.14 $
|
| $Revision: 1.15 $
|
||||||
| $Date: 2008-05-25 09:04:16 $
|
| $Date: 2008-07-06 21:25:31 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+---------------------------------------------------------------+
|
+---------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -623,7 +623,7 @@ function file_size_decode($source, $compare = 0, $action = '')
|
|||||||
$source = trim($source);
|
$source = trim($source);
|
||||||
if (strtolower(substr($source,-1,1)) == 'b') $source = substr($source,0,-1); // Trim a trailing byte indicator
|
if (strtolower(substr($source,-1,1)) == 'b') $source = substr($source,0,-1); // Trim a trailing byte indicator
|
||||||
$mult = 1;
|
$mult = 1;
|
||||||
$nostrip = FALSE;
|
if (strlen($source) && (strtoupper(substr($source,-1,1)) == 'B')) $source = substr($source,0,-1);
|
||||||
if (!$source || is_numeric($source))
|
if (!$source || is_numeric($source))
|
||||||
{
|
{
|
||||||
$val = $source;
|
$val = $source;
|
||||||
|
Reference in New Issue
Block a user