tags 436289 + patch
stop

Hello

I tested all 94 examples and they all worked very well on Lenny *but* the
library installs its own error handler that, before anything else, checks
if there have been any compile time errors and if so displays them regardless
of the current "error_reporting" or "display_errors" settings.

As the library was designed for PHP4 it calls methods statically which are not
declared using the new "static" keyword which leads to warnings like:
        General PHP error:
        Non-static method JpGraphError::Install() should not be called 
statically
Those warnings were printed to stdout and the Browser could not identify the 
output
as PNG or JPG any more which effectively renders the current version of the 
library pretty useless on Lenny.  

The below patch does neither prevent the display of compile time errors like:
        Parse error: syntax error, unexpected ';' in backgroundex01.php on line 
2
nor runtime errors like:
        Fatal error: Call to undefined function foo() backgroundex01.php on 
line 2
So I would consider it not to be harmful or to produce much problems on 
upgrades.

bye,

-christian-

P.S.: A graphic library shouldn't mess around with error handlers anyway,
      this alone would justify a bug report. 


diff -u libphp-jpgraph-1.5.2/src/jpgraph.php 
libphp-jpgraph-1.5.2/src/jpgraph.php
--- libphp-jpgraph-1.5.2/src/jpgraph.php
+++ libphp-jpgraph-1.5.2/src/jpgraph.php
@@ -246,7 +246,9 @@
 //user
 //
 if( isset($GLOBALS['php_errormsg']) ) {
-    JpGraphError::Raise("<b>General PHP 
error:</b><br>".$GLOBALS['php_errormsg']);
+    // Disabled by Debian to prevent showing PHP5 warnings
+    // ("Non-static method called statically")
+    // JpGraphError::Raise("<b>General PHP 
error:</b><br>".$GLOBALS['php_errormsg']);
 }
 
 //
diff -u libphp-jpgraph-1.5.2/debian/changelog 
libphp-jpgraph-1.5.2/debian/changelog
--- libphp-jpgraph-1.5.2/debian/changelog
+++ libphp-jpgraph-1.5.2/debian/changelog
@@ -1,3 +1,14 @@
+libphp-jpgraph (1.5.2-11+u1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Applied patch that prevented PHP5 compile time generated warning
+    "Non-static method called statically" to appear on screen and corrupts
+    the output of graphics. The usual error_reporting and display_errors
+    had no effect as a custom error handler was installed by the library.
+    Closes: #436289
+
+ -- Christian Hammers <c...@debian.org>  Sat, 10 Jan 2009 00:10:30 +0100
+
 libphp-jpgraph (1.5.2-11) unstable; urgency=low
 
   * Added support for php5(-gd), reviewed all example that seems to
work



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to