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
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.
Block user comment
Status: Assign to:
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-2020 The PHP Group
All rights reserved.
Last updated: Mon Nov 23 22:01:26 2020 UTC