Classi per la configurazione upload
Cristiano Magro
2018-01-16 371ed41c336704699febc7ad2c30e1d4886bf1c0
src/UploadFile/SetupUpload.class.php
@@ -131,7 +131,7 @@
     */
    public function setNumMaxFiles($numero) {
        if (!is_integer($numero) || $numero <= 0) {
            throw new UploadFile_Exc();
            throw new Upload_Exc_Error();
        }
        $this->numMaxFiles = $numero;
@@ -214,13 +214,13 @@
        //validazione
        if (strlen(trim($strSize)) === 0) {
            //una stringa vuota non può essere convertita
            throw new UploadFile_Exc();
            throw new Upload_Exc_Error();
        } elseif (strlen(trim($strValue)) === 0) {
            //se non trovo la parte del valore della stringa non posso convertire
            throw new UploadFile_Exc();
            throw new Upload_Exc_Error();
        } elseif (strlen($strUnit) >= 1 && !array_key_exists($strUnit, $Units)) {
            //l'unita' non e' nota
            throw new UploadFile_Exc();
            throw new Upload_Exc_Error();
        }
        $Exponent = isset($Units[$strUnit]) ? $Units[$strUnit] : 0;