php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43477 Error mode ignored in unicode_decode()
Submitted: 2007-12-02 14:58 UTC Modified: 2008-03-21 15:39 UTC
From: geoffers at gmail dot com Assigned:
Status: Closed Package: Unicode Engine related
PHP Version: 6CVS-2007-12-02 (CVS) OS: Debian Etch
Private report: No CVE-ID: None
 [2007-12-02 14:58 UTC] geoffers at gmail dot com
Description:
------------
Regardless of how any error mode is set, whether it be via the third 
parameter of unicode_decode() or via unicode_set_error_mode(), it is 
ignored and U_CONV_ERROR_STOP is used.

Reproduce code:
---------------
<?php
var_dump(unicode_decode(b"\xF8", 'UTF-8', U_CONV_ERROR_SKIP));
?>

Expected result:
----------------
string(0) ""



Actual result:
--------------
Warning: could not decode binary string (converter UTF-8 failed on bytes 
(0xF8) at offset 0) in - on line 2
bool(false)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-21 15:39 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 17:01:30 2019 UTC