Non-static method should not be called statically
Posted: Thu Sep 23, 2010 10:31 am
I am having an issue with a Pear package.
I have used File_PDF for a few years now and am still on 0.3.2.
For some reason, this morning I started getting issues with generating a PDF. This causes the entire PDF generation to fail in this script.
The kicker is, I have another file in the same directory which calls it exactly the same way and can currently generate a PDF without issue.
Does anyone have any idea why the Pear package would fail for one file but not another, especially when they are in the same directory?
I have used File_PDF for a few years now and am still on 0.3.2.
For some reason, this morning I started getting issues with generating a PDF. This causes the entire PDF generation to fail in this script.
Code: Select all
[Time: Thu Sep 23 2010 09:59:30] PHP Error: Non-static method File_PDF::factory() should not be called statically in (path removed) on line 26\n
Code: Select all
$LINE_HEIGHT=0.1875;
$FONT_FAMILY="Courier";
$FONT_SIZE=11;
$HEADER_HEIGHT=1.25;
$pdf = &File_PDF::factory('P', 'in', 'Letter');
//$pdf = &File_PDF::factory(array('orientation'=>'P','unit'=>'in', 'format'=>'Letter'));
$pdf->open();
$pdf->addPage();
$pdf->setFont($FONT_FAMILY, '', $FONT_SIZE);
$pdf->setFillColor('rgb', 0, 0, 0);
$pdf->setLeftMargin(0);
$pdf->setAutoPageBreak(true,0);The kicker is, I have another file in the same directory which calls it exactly the same way and can currently generate a PDF without issue.
Code: Select all
$pdf = &File_PDF::factory('P', 'in', 'Letter');
$pdf->open();
$pdf->addPage();
$pdf->setFont($FONT_FAMILY, '', $FONT_SIZE);
$pdf->setFillColor('rgb', 0, 0, 0);
$pdf->setLeftMargin(0);