php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56130 Inconsistent error functions
Submitted: 2004-07-13 08:51 UTC Modified: 2012-01-21 11:45 UTC
From: vrana@php.net Assigned:
Status: Wont fix Package: Tidy (PECL)
PHP Version: 4.3.3 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vrana@php.net
New email:
PHP Version: OS:

 

 [2004-07-13 08:51 UTC] vrana@php.net
Description:
------------
Tidy snapshot from: 2004-07-13 11:47

Functions tidy_error_count, tidy_warning_count and tidy_get_error_buffer are inconsistent in case of multiple calls in the same process.

Reproduce code:
---------------
<?php
$file = file_get_contents("http://www.amazon.com/");
tidy_setopt("accessibility-check", 1);

for ($i=0; $i < 4; $i++) {
    tidy_parse_string($file);
    echo tidy_error_count() ."+". tidy_warning_count() ." = ". substr_count(tidy_get_error_buffer(), "\n") ."\n";
}
?>


Expected result:
----------------
5+266 = 271
5+266 = 271
5+266 = 271
5+266 = 271


Actual result:
--------------
5+266 = 271
11+265 = 10
17+265 = 0
23+265 = 0


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-21 11:45 UTC] nlopess@php.net
-Status: Open +Status: Wont fix -Package: tidy +Package: Tidy
 [2012-01-21 11:45 UTC] nlopess@php.net
php 4 not supported anymore.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC