|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34786 2 @ results in change to error_reporting() to random value
Submitted: 2005-10-08 04:09 UTC Modified: 2005-10-10 12:56 UTC
From: Assigned: tony2001 (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2005-10-08 (CVS) OS: linux (gentoo)
Private report: No CVE-ID: None
 [2005-10-08 04:09 UTC]
This is a critical bug in PHP 5.1 (PHP_5_1) latest CVS.

running "make install-pear" results in all kinds of E_STRICT warnings.  This is in spite of an explicit -derror_reporting=E_ALL

I traced the problem using var_dump(error_reporting()); peppered throughout the source of install-pear.phar to a single line located in cvs at pear-core/Archive/Tar.php on line 706:

@fseek($this->_file, @ftell($this->_file)+($p_len*512));

removing the second @ in front of ftell() fixes the problem.

Reproduce code:
make install-pear.phar

use for a debug .phar that has inserted a few var_dump(error_reporting()); around the offending line.  int(2047) is E_ALL, and after the line, there are 2 var_dump(error_reporting()) that spit out random integers, ranging from 10 to numbers like 14803908 to -14378917.

A valgrind trace is at:

Expected result:
works with no warnings

Actual result:
install works sometimes, but there are lots of E_STRICT warnings.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-08 14:22 UTC]
Assigned to the engine expert. :)

 [2005-10-10 12:56 UTC]
Fixed in CVS HEAD and PHP_5_1.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:25 2019 UTC