Search the causal link between this and devs going mad o_O
The Weird and The Wonderful
1
Posts
1
Posters
0
Views
1
Watching
-
Everything about this method (PHP) is just wrong... it also throws a fatal error because it's setting $res to a string, and then calls getNext() on it the next iteration. Wtf...
static function searchCausalLink( $pageName, $rev ) { if ( $rev == 0 ) { return 'none'; } else { $res = utils::getSemanticQuery( '\[\[Patch:+\]\]\[\[onPage::' . $pageName . '\]\]\[\[Rev::' . $rev . '\]\]', '?PatchID' ); if ( $res === false ) return 'none'; $count1 = $res->getCount(); for ( $j = 0; $j < $count1; $j++ ) { $row1 = $res->getNext(); if ( $row1 === false ) break; $row1 = $row1\[0\]; $col1 = $row1->getContent(); foreach ( $col1 as $object1 ) { $wikiValue1 = $object1->getWikiValue(); $res = $wikiValue1; } } return $res; } }