Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Passing empty filename to exif_read_data() and exif_thumnail() --EXTENSIONS-- exi..

Decoded Output download

--TEST--
Passing empty filename to exif_read_data() and exif_thumnail()
--EXTENSIONS--
exif
--FILE--
<?php

try {
    exif_read_data("");
} catch (ValueError $e) {
    echo $e->getMessage(), "
";
}

try {
    exif_thumbnail("");
} catch (ValueError $e) {
    echo $e->getMessage(), "
";
}

try {
    exif_read_data("foobar");
} catch (ValueError $e) {
    echo $e->getMessage(), "
";
}

try {
    exif_thumbnail("foobar");
} catch (ValueError $e) {
    echo $e->getMessage(), "
";
}

?>
--EXPECT--
exif_read_data(): Argument #1 ($file) cannot be empty
exif_thumbnail(): Argument #1 ($file) cannot be empty
exif_read_data(): Argument #1 ($file) must not contain any null bytes
exif_thumbnail(): Argument #1 ($file) must not contain any null bytes

Did this file decode correctly?

Original Code

--TEST--
Passing empty filename to exif_read_data() and exif_thumnail()
--EXTENSIONS--
exif
--FILE--
<?php

try {
    exif_read_data("");
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

try {
    exif_thumbnail("");
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

try {
    exif_read_data("foo\0bar");
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

try {
    exif_thumbnail("foo\0bar");
} catch (ValueError $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
exif_read_data(): Argument #1 ($file) cannot be empty
exif_thumbnail(): Argument #1 ($file) cannot be empty
exif_read_data(): Argument #1 ($file) must not contain any null bytes
exif_thumbnail(): Argument #1 ($file) must not contain any null bytes

Function Calls

None

Variables

None

Stats

MD5 1235bbc6c6a03a015f76e5262d840e84
Eval Count 0
Decode Time 111 ms