wkeese / old-api-viewer

Old viewer for output of old js-doc-parse, replaced by https://github.com/dojo/dapi
22 stars 10 forks source link

Undefined Index "topfunc" #28

Closed kitsonk closed 12 years ago

kitsonk commented 12 years ago

generate.php is incorrectly trying to determine an existence of a key in an array. Currently is has:

if($obj["topfunc"]){

When in PHP it should be:

if(in_array("topfunc", $obj)){

(Also known as what happens when JS developers do PHP)

wkeese commented 12 years ago

Hmm, well the rest of the code uses array_key_exists(), perhaps that's better?

... yah, looks like in_array() is just wrong because it checks for a value, not a key, and this change breaks the display of the top function (ex: dojo/on) completely. I'll check in a fix.