mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
cf2626f10c
previous codes: "#define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)): (int)mbrlen(ptr, len, &BG(mblen_state)))# it use mbsinit there, seems try to initialize the mblen_state, but: "This function does not change the state identified by ps. Typical ways to make the state pointed by ps an initial state are: memset (ps,0,sizeof(*ps)); // ps points to zero-valued object " http://www.cplusplus.com/reference/cwchar/mbsinit/?kw=mbsinit
18 lines
377 B
PHP
18 lines
377 B
PHP
--TEST--
|
|
Bug #65947 (basename is no more working after fgetcsv in certain situation)
|
|
--SKIPIF--
|
|
<?php if (!PHP_ZTS) { print "skip only for zts build"; }
|
|
--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";
|
|
--EXPECTF--
|
|
OKEY
|