//this function is supposed to evaluate to true if ($pdf->CheckPageBreak($image_row_height) == 1){ $y_axis = $y_axis_initial; } //this is the function which is called from a class mc_table function CheckPageBreak($h){ //If the height h would cause an overflow, add a new page immediately if($this->GetY()+$h>$this->PageBreakTrigger) $this->AddPage($this->CurOrientation); } //This is a script that generates pdfs on the fly using the fpdf and mc_table classes. It only broke when I upgraded my server to php5. The function is supposed to trigger a page break and then if it is true reset the y axis. It triggers the page break but doesnt reset the $y_axis as per the if atatement.