Ahojte, chcem vás trochu zneužiť ;D na opravu chýb ktoré potrebujem opraviť. :D viac slov na opraviť na nenapadlo do 1 vety :)
1. [error] [client xyz] PHP Notice: Trying to get property of non-object in /var/www1/pages/update.php on line 32
30. $jsonFile = json_decode(file_get_contents($url));
31.
32. if (version_compare($currentVersion, $jsonFile->latest, '<')) {
33. $notifi[] = '<h2><a href=" '. $jsonFile->download .'" target="_blank">'.$messages["524"].'</a></h2>';
34. }
2. [error] [client xyz] PHP Notice: Undefined offset: 2 in /var/www1/pages/autodj_bottom.php on line 83
Ten offset ide id 2 až po 102
81. echo '<option class=\"playlistselectdrop\" value=\"">' . $messages["adb1"] . '</option>';
82. for ($i = $listing_start; $i <= $listing_end; $i++) {
83. if (($dirlisting[$i] != ".") and ($dirlisting[$i] != "..") and ($dirlisting[$i] != "")) {
84. echo "<option class=\"playlistselectdrop\" value=\"" . $dirlisting[$i] . "\">" . $dirlisting[$i] . "</option>";
85. }
}
1. Jaký je obsah $jsonFile a file_get_contents($url)? Chyba znamená, že $jsonFile není objekt, nejspíš bude null, protože file_get_contents($url) není validní JSON.
2. $dirlisting[2] není definován.
Niečo opravím, a niečo sa zase do**be :-X :-\