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-- Bug #40228 (extractTo does not create recursive empty path) --EXTENSIONS-- zip --..

Decoded Output download

--TEST--
Bug #40228 (extractTo does not create recursive empty path)
--EXTENSIONS--
zip
--FILE--
<?php
$dest = __DIR__ . "/bug40228-mb";
$arc_name = __DIR__ . "/bug40228.zip";
$zip = new ZipArchive;
$zip->open($arc_name, ZIPARCHIVE::CREATE);
$zip->extractTo($dest);
if (is_dir($dest . '/test/empty')) {
    echo "Ok
";
    rmdir($dest . '/test/empty');
    rmdir($dest . '/test');
    rmdir($dest);
} else {
    echo "Failed.
";
}
echo "Done
";
?>
--EXPECT--
Ok
Done

Did this file decode correctly?

Original Code

--TEST--
Bug #40228 (extractTo does not create recursive empty path)
--EXTENSIONS--
zip
--FILE--
<?php
$dest = __DIR__ . "/bug40228-mb";
$arc_name = __DIR__ . "/bug40228.zip";
$zip = new ZipArchive;
$zip->open($arc_name, ZIPARCHIVE::CREATE);
$zip->extractTo($dest);
if (is_dir($dest . '/test/empty')) {
    echo "Ok\n";
    rmdir($dest . '/test/empty');
    rmdir($dest . '/test');
    rmdir($dest);
} else {
    echo "Failed.\n";
}
echo "Done\n";
?>
--EXPECT--
Ok
Done

Function Calls

None

Variables

None

Stats

MD5 9ed78410ddef803ab35b3b97005b43c6
Eval Count 0
Decode Time 91 ms