sıkı standartlar: 5.0 yöntem izni 4,0 permissionless yöntemi ile uyumlu olmalıdır

0 Cevap php

Ben bir pdf sınıfını genişleten bir rapor üreten bir sınıf var. Rapor üreten sınıf her yöntem izni (public, private, vb veya ne olursa olsun onu aramak) sahip 5.0 tarzı, yazılmıştır. Temel sınıf 4.0 tarzında yazılmış ve yöntemleri veya değişkenler için public, private, vb beyanı yoktur.

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()

Ama ne olursa olsun ben hiç stream(), kamu özel, korumalı, ya da hiç izin vermek ne beyanı, ben hala bu hatayı alıyorum.

Ben bu düzeltebilirim? Ben bu üzerinde çalışıyorum Ya da ben sıkı standartlar kapatmanız gerekir.

Bu işlevsellik ödeme için çok fazla çalışma için çünkü yeni bir sınıfa göç bu noktada bir seçenek değildir. Sıkı standartlar kapalı olduğunda iyi çalışır.


Edit: Biraz test yaptım ve burada sonuçların matris. Ne olursa olsun, Strict Standards hala yakınıyor.

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()

(: Ayrıca o akarsuyun kendi üst sınıf gibi 0 argümanları vardır unutmayın

0 Cevap