The attached patch works with base 1.4.5 and php5.2/php5.3 it replace ereg(i) with preg_match(/i).
Additional for php5.3 the following diff should be applied (not included in attached patch)
--- ./base_graph_display.php.orig 2010-03-05 16:06:17.000000000 +0100
+++ ./base_graph_display.php 2010-04-11 23:52:13.000000000 +0200
@@ -114,7 +114,7 @@
// Create the graph area, legends on bottom -- Alejandro
- $Graph =& new Image_Graph(array('driver'=>'gd',
+ $Graph = new Image_Graph(array('driver'=>'gd',