Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Dziwny błąd
kajzur
post
Post #1





Grupa: Zarejestrowani
Postów: 385
Pomógł: 26
Dołączył: 22.03.2008
Skąd: TM

Ostrzeżenie: (0%)
-----


Catchable fatal error: Argument 2 passed to goods::addGoods() must be an instance of integer, integer given, called in C:\Program Files\WebServ\httpd-users\all\index.php on line 16 and defined in C:\Program Files\WebServ\httpd-users\all\class.php on line 140

Dostaje taki błąd.. Dziwny ponieważ można przetłumaczyć go jakos: argument drugi podany do goods::addGoods() musi być typem integer, integer podany, w C:\Program Files\WebServ\httpd-users\all\index.php on line 16 and defined in C:\Program Files\WebServ\httpd-users\all\class.php on line 140

O co mu chodzi jeśli kurde dałem mu integer a w deklaracji klasy również jest integer:
  1. <?php
  2. public function addGoods($nazwa, integer $kategoria, $opis, double $cena, integer $ilosc)
  3. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.12.2025 - 03:57