I got this error after installing SemanticMediaWiki on MW with:

// Register namespace identifiers
if (!is_array($wgExtraNamespaces)) { $wgExtraNamespaces=array(); }
$wgExtraNamespaces = $wgExtraNamespaces + $smwgContLang->getNamespaces();

$wgNamespaceAliases = $wgNamespaceAliases + $smwgContLang->getNamespaceAliases();

after some investigation I see that $wgNamespaceAliases is NULL, while $smwgContLang->getNamespaceAliases() returns an empty array. 

So I went ahead and added the same   " if (!is_array "  test to test $wgNamespaceAliases as had bgeen done with $wgExtraNamespaces, converting it to an empty array if necessary, and the code seems to work (though I haven't tested any part of the extension yet). 

It's hard to imagine that this is a bug because it would stop any installation cold.  Is there something I'm doing or not doing here?