Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z wordpressem, [PHP]
senior.pol
post
Post #1





Grupa: Zarejestrowani
Postów: 158
Pomógł: 0
Dołączył: 10.08.2011

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


W trybie DEBUG wordpress wyskakuje mi komunikat:

Notice: Only variables should be passed by reference in .../ot-loader.php on line 98

  1. $path = ltrim( end( @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' );


Ktoś może mi pomóc w naprawieniu tego problemu?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
untorched
post
Post #2





Grupa: Zarejestrowani
Postów: 318
Pomógł: 76
Dołączył: 27.12.2011
Skąd: Dąbrowa Górnicza

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


Czytając manual o funkcji end - Set the internal pointer of an array to its last element; oraz treść błędu Only variables should be passed by reference można dojść do wniosku, iż nie możesz przekazać funkcji jako referencji.

  1. $arr = explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) );
  2. $path = ltrim( end($arr), '/' );
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: 23.12.2025 - 00:26