php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24188 HTML_Page examples broken
Submitted: 2003-06-14 20:03 UTC Modified: 2003-06-21 17:31 UTC
From: rocha at i-node dot com dot br Assigned: thesaur (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rocha at i-node dot com dot br
New email:
PHP Version: OS:

 

 [2003-06-14 20:03 UTC] rocha at i-node dot com dot br
Description:
------------
Looks like the new pass by reference on the addBodyContent has broken  the examples. 
This script dont work:
<?php
require_once('HTML/Page.php');
$p = new HTML_Page();
$p->addBodyContent("Teste");
$p->display();
?>

But this one does:
<?php
require_once('HTML/Page.php');
$p = new HTML_Page();
$body = "Teste";
$p->addBodyContent($body);
$p->display();
?>
Another problem, after fix the above in the example file Page_Complex.php,  addMetaData() doesnt exists, it is setMetaData rigth? Even fixing that I got the page, but with errors:

Notice: Error: "STRICT" is an unsupported or illegal document type. in /usr/lib/php/PEAR.php on line 744
Object 

Regards
S.Rocha



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-15 04:26 UTC] thesaur@php.net
I guess I was overconfident about the examples and as usual, Murphy's Law struck home. A bugfix will be released shortly.
 [2003-06-21 17:14 UTC] thesaur@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 [2003-06-21 17:31 UTC] thesaur@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

hmm... the text for quick fix "fixed in release" was not quite what I had in mind ;-)

At any rate, the problem is solved as of release 2.0.0b2.

One thing that I forgot to update in the release (and it's probably not going to bug people that much) is that in docs/HTML_Page/examples/Page_NoDoctype.php there is a small mistake:

$p = new HTML_Page('simple="true"');
should be:
$p = new HTML_Page('doctype="none");

This has been fixed in CVS and will be put into the next release.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 08:03:36 2021 UTC