Do you still get that error when you remove those three lines of code?
In reply to Re: GD & GD::Graph by Mr. Muskrat in thread GD & GD::Graph by Anonymous Monk