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 #65947 (basename is no more working after fgetcsv in certain situation) --FIL..

Decoded Output download

--TEST--
Bug #65947 (basename is no more working after fgetcsv in certain situation)
--FILE--
<?php
$filename = 'test.toto';
//  in ISO-8859-1
$csv = base64_decode('6Q==');
$adata = str_getcsv($csv,";");
$b2 = basename($filename);
if ($filename != $b2)
    print "BUG";
else
    print "OKEY";
?>
--EXPECT--
OKEY

Did this file decode correctly?

Original Code

--TEST--
Bug #65947 (basename is no more working after fgetcsv in certain situation)
--FILE--
<?php
$filename = 'test.toto';
//  in ISO-8859-1
$csv = base64_decode('6Q==');
$adata = str_getcsv($csv,";");
$b2 = basename($filename);
if ($filename != $b2)
    print "BUG";
else
    print "OKEY";
?>
--EXPECT--
OKEY

Function Calls

str_getcsv 1
base64_decode 1

Variables

$filename test.toto

Stats

MD5 ef789c56e6927df919901afbf5fd8c92
Eval Count 0
Decode Time 104 ms