gitpajo / nfwjob

New fine working job
2 stars 1 forks source link

Zařazení #3

Closed myjavarama4 closed 8 years ago

myjavarama4 commented 8 years ago

v klici zarazeni mame: [DLE VÝROBCE] => Array ( [0] => Tiskárny [1] => Multifunkční [2] => OKI [3] => Multifunkční tiskárny ) spravne by to melo byt takto: [DLE VÝROBCE] => Array ( [0] => Tiskárny -> Multifunkční [1] => OKI -> Multifunkční tiskárny )

Ty jsi psal tu funkci, navíc chci to udělat než půjdu

gitpajo commented 8 years ago

Jaké je url toho produktu?

myjavarama4 commented 8 years ago

Cože?

gitpajo commented 8 years ago

Už to vim

gitpajo commented 8 years ago

Lepsi bude pouzit children

myjavarama4 commented 8 years ago

Call to a member function next_sibling() on null

Řádek 176

gitpajo commented 8 years ago

Mas na radku 176 neco jineho nez na githubu

myjavarama4 commented 8 years ago

$produkt['zarazeni'][$kategorie] .= ' -> ' . $eee->plaintext;

Tenhle řádek

myjavarama4 commented 8 years ago

V tomhle řádek je problém

if ($eee->next_sibling() != null)

myjavarama4 commented 8 years ago

Pořád to vypisuje stejnou chybu

gitpajo commented 8 years ago

ale tady zadny next_sibling neni

myjavarama4 commented 8 years ago

function getInclusion($obsah_stranky, $produkt) { foreach ($obsah_stranky->find('div[id=zarazeni-produktu]') as $tabulka) { $podm = TRUE; $i = 0; $j = 0; $eee = $tabulka->find('strong.hcat', 0); while ($podm && $eee) { if ($eee->next_sibling() != null) { if ($eee->tag == 'strong') { $kategorie = $eee->plaintext; } if ($eee->tag == 'a') { $produkt['zarazeni'][$kategorie] .= ' -> ' . $eee->plaintext; } $eee = $eee->next_sibling(); } else { $podm = FALSE; } $i++; $j++; } } return $produkt; }

Teď to vypisuje chybu tady

$produkt['zarazeni'][$kategorie] .= ' -> ' . $eee->plaintext;

12 chyb, všechny cosi undefined index