Annotation of embedaddon/php/tests/basic/rfc1867_max_file_uploads_empty_files_debug.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: rfc1867 max_file_uploads - empty files shouldn't count (debug version)
        !             3: --SKIPIF--
        !             4: <?php if(!function_exists("leak")) print "skip only for debug builds"; ?>
        !             5: --INI--
        !             6: file_uploads=1
        !             7: error_reporting=E_ALL
        !             8: max_file_uploads=1
        !             9: --POST_RAW--
        !            10: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
        !            11: -----------------------------20896060251896012921717172737
        !            12: Content-Disposition: form-data; name="file2"; filename=""
        !            13: Content-Type: text/plain-file
        !            14: 
        !            15: 
        !            16: -----------------------------20896060251896012921717172737
        !            17: Content-Disposition: form-data; name="file3"; filename=""
        !            18: Content-Type: text/plain-file
        !            19: 
        !            20: 33
        !            21: -----------------------------20896060251896012921717172737
        !            22: Content-Disposition: form-data; name="file4"; filename="file4.txt"
        !            23: Content-Type: text/plain-file
        !            24: 
        !            25: 
        !            26: -----------------------------20896060251896012921717172737
        !            27: Content-Disposition: form-data; name="file1"; filename="file1.txt"
        !            28: Content-Type: text/plain-file
        !            29: 
        !            30: 1
        !            31: -----------------------------20896060251896012921717172737--
        !            32: --FILE--
        !            33: <?php
        !            34: var_dump($_FILES);
        !            35: var_dump($_POST);
        !            36: if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
        !            37:        var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
        !            38: }
        !            39: ?>
        !            40: --EXPECTF--
        !            41: Notice: No file uploaded in Unknown on line 0
        !            42: 
        !            43: Notice: No file uploaded in Unknown on line 0
        !            44: 
        !            45: Warning: Uploaded file size 0 - file [file4=file4.txt] not saved in Unknown on line 0
        !            46: array(4) {
        !            47:   ["file2"]=>
        !            48:   array(5) {
        !            49:     ["name"]=>
        !            50:     string(0) ""
        !            51:     ["type"]=>
        !            52:     string(0) ""
        !            53:     ["tmp_name"]=>
        !            54:     string(0) ""
        !            55:     ["error"]=>
        !            56:     int(4)
        !            57:     ["size"]=>
        !            58:     int(0)
        !            59:   }
        !            60:   ["file3"]=>
        !            61:   array(5) {
        !            62:     ["name"]=>
        !            63:     string(0) ""
        !            64:     ["type"]=>
        !            65:     string(0) ""
        !            66:     ["tmp_name"]=>
        !            67:     string(0) ""
        !            68:     ["error"]=>
        !            69:     int(4)
        !            70:     ["size"]=>
        !            71:     int(0)
        !            72:   }
        !            73:   ["file4"]=>
        !            74:   array(5) {
        !            75:     ["name"]=>
        !            76:     string(9) "file4.txt"
        !            77:     ["type"]=>
        !            78:     string(0) ""
        !            79:     ["tmp_name"]=>
        !            80:     string(0) ""
        !            81:     ["error"]=>
        !            82:     int(5)
        !            83:     ["size"]=>
        !            84:     int(0)
        !            85:   }
        !            86:   ["file1"]=>
        !            87:   array(5) {
        !            88:     ["name"]=>
        !            89:     string(9) "file1.txt"
        !            90:     ["type"]=>
        !            91:     string(15) "text/plain-file"
        !            92:     ["tmp_name"]=>
        !            93:     string(%d) "%s"
        !            94:     ["error"]=>
        !            95:     int(0)
        !            96:     ["size"]=>
        !            97:     int(1)
        !            98:   }
        !            99: }
        !           100: array(0) {
        !           101: }
        !           102: string(1) "1"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>