|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-20 15:07 UTC] marc at durdin dot net
Description: ------------ Bug 31465 has been marked as fixed in 5.0.4 - however, I just upgraded to 5.0.4 and started experiencing it on my system - using it to upload files as follows: I am using the stock precompiled download from php.net. Basic PHP information: PHP Version => 5.0.4 System => Windows NT 5.2 build 3790 Build Date => Mar 31 2005 02:44:34 Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API => Command Line Interface Virtual Directory Support => enabled Configuration File (php.ini) Path => [obscured] PHP API => 20031224 PHP Extension => 20041030 Zend Extension => 220040412 Debug Build => no Thread Safety => enabled IPv6 Support => enabled Registered PHP Streams => php, file, http, ftp, compress.zlib Registered Stream Socket Transports => tcp, udp Marc Durdin Reproduce code: --------------- $datastring = file_get_contents($Filename); $data = unpack("H*hex", $datastring); $FileID = mssql_db_call_to_store_file($OriginalFileName, '0x'.$data['hex']); Expected result: ---------------- (no output expected) Actual result: -------------- Warning: unpack() function.unpack: Type H: outside of string PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Managed to get a script that will do it every time (seems that it raises a E_WARNING). Again, doesn't generate the warning on 5.0.2, does on 5.0.4. <?php set_error_handler("err_handler"); unpack("H*hex", 'abc'); function err_handler($errno, $errstr, $errfile, $errline, $vars) { echo $errno . ": " . $errstr; } ?>