Debian Bug report logs - #506970
PHP 5.2.0-8+etch13 function bug - Warning: htmlentities() expects at most 3 parameters, 4 given

version graph

Package: php5; Maintainer for php5 is (unknown);

Reported by: "Stuart Lindley" <stuart.lindley@gmail.com>

Date: Wed, 26 Nov 2008 15:57:06 UTC

Severity: normal

Found in version php5/5.2.0-8+etch13

Done: "Raphael Geissert" <atomo64@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#506970; Package php5. (Wed, 26 Nov 2008 15:57:10 GMT) (full text, mbox, link).


Acknowledgement sent to "Stuart Lindley" <stuart.lindley@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 26 Nov 2008 15:57:21 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Stuart Lindley" <stuart.lindley@gmail.com>
To: submit@bugs.debian.org
Subject: PHP 5.2.0-8+etch13 function bug - Warning: htmlentities() expects at most 3 parameters, 4 given
Date: Wed, 26 Nov 2008 15:55:38 +0000
[Message part 1 (text/plain, inline)]
Package: php5
Version: 5.2.0-8+etch13

When I use htmlentities() function with 4 parameters, I get the following
error:

Warning: htmlentities() expects at most 3 parameters, 4 given

The code that causes this is. Any code which uses 4 parameters in this
function will cause this problem

<?php

    $htmlForOutput = "this is some text &amp; some <html>";

    echo htmlentities($htmlForOutput, ENT_QUOTES, "UTF-8", false);

?>

This function accepts up to 4 parameters, the 4th one being important to me
in this instance as I don't want double HTML entity encoding.

http://uk2.php.net/manual/en/function.htmlentities.php
[Message part 2 (text/html, inline)]

Reply sent to "Raphael Geissert" <atomo64@gmail.com>:
You have taken responsibility. (Wed, 26 Nov 2008 22:18:15 GMT) (full text, mbox, link).


Notification sent to "Stuart Lindley" <stuart.lindley@gmail.com>:
Bug acknowledged by developer. (Wed, 26 Nov 2008 22:18:16 GMT) (full text, mbox, link).


Message #10 received at 506970-done@bugs.debian.org (full text, mbox, reply):

From: "Raphael Geissert" <atomo64@gmail.com>
To: 506970-done@bugs.debian.org
Subject: Re: [php-maint] Bug#506970: PHP 5.2.0-8+etch13 function bug - Warning: htmlentities() expects at most 3 parameters, 4 given
Date: Wed, 26 Nov 2008 16:11:26 -0600
Hi,

2008/11/26 Stuart Lindley <stuart.lindley@gmail.com>:
> Package: php5
> Version: 5.2.0-8+etch13
^^^^^^^^^^^^^^^^^^^^^^^^

>
> When I use htmlentities() function with 4 parameters, I get the following
> error:
>
> Warning: htmlentities() expects at most 3 parameters, 4 given
>
> The code that causes this is. Any code which uses 4 parameters in this
> function will cause this problem

Of course it does, the fourth parameter was added in 5.2.3.

> http://uk2.php.net/manual/en/function.htmlentities.php

The man page itself mentions it, in the "ChangeLog" section.

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net

W. C. Fields  - "I cook with wine, sometimes I even add it to the food."




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 25 Dec 2008 07:27:23 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 00:21:56 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.