I have a report-generating class that extends a pdf class. The report-generating class is written in 5.0 style, where each method has a permission ( public
, private
, etc or whatever you call it). The base class was written in 4.0 style and doesn't have public
, private
, etc declaration for methods or variables.
I've recently turned on strict standards on our development machine, and now I'm getting errors that
Strict standards: Declaration of reportPdf::stream() should be compatible with that of Cpdf::stream()
But no matter what declaration I give to stream()
, public, private, protected, or no permission at all, I still get this error.
Can I fix this? Or must I turn off strict standards while I'm working on this.
Migrating to a newer class is not an option at this point because it's too much work to for the functionality payoff. It works fine when strict standards are turned off.
Edit: I did some testing, and here's the matrix of results. No matter what, Strict Standards
still complains.
protected function stream() { ...
Fatal error: Access level to reportPdf::stream() must be public (as in class Cpdf) in
public function stream() { ...
Strict standards: Declaration of reportPdf::stream() should be compatible with that of Cpdf::stream()
private function stream() { ...
Fatal error: Access level to reportPdf::stream() must be public (as in class Cpdf)
function stream() { ...
Strict standards: Declaration of reportPdf::stream() should be compatible with that of Cpdf::stream()
Also note that stream has 0 arguments, just like its parent class :(