php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49579 Strange behavior for warning "Invalid multibyte sequence in argument"
Submitted: 2009-09-17 17:06 UTC Modified: 2009-09-18 14:24 UTC
From: andrea dot barani at tin dot it Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.0 OS: Windows 7 (x64)
Private report: No CVE-ID: None
 [2009-09-17 17:06 UTC] andrea dot barani at tin dot it
Description:
------------
The warning message is only generated when display_errors = off

Tested using Apache 2.2.13 (win32)

Reproduce code:
---------------
echo htmlspecialchars(chr(224), ENT_COMPAT, 'utf-8');

Expected result:
----------------
PHP Warning:  htmlentities(): Invalid multibyte sequence in argument in [...] on line [...]

Actual result:
--------------
display_errors = Off   ->   The error message is logged but not displayed (correct)
display_errors = On    ->   No error message is neither displayed nor logged (buggy?)

Obviously assuming log_errors = On.

With a custom error handler and display_errors = off the handler is called and the error informations are correct.

If display_errors = on the custom error handler isn't called.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-18 13:00 UTC] jani@php.net
See bug #47494 and my comment there for reason. Another reason for this to be bogus: you failed to search before submitting another report about same issue.
 [2009-09-18 14:24 UTC] andrea dot barani at tin dot it
Sorry for double submission, I've searched for a similar bug but haven't found it.

I read your comment on the other bug entry and checked out source code, but i don't get the point to make it intentional. We have to retest our whole code with display_errors=off in order to check for errors that otherwise won't be displayed? :S

Anyway thank you for your response. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 10:01:28 2024 UTC