From: Felipe Oliveira Carvalho Date: Wed, 10 Aug 2011 14:50:10 +0000 (-0300) Subject: Fix phutil_analyzer bug on interface dependency creation X-Git-Tag: conduit-4~282^2~4^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0eab28fe1bf1ccedabc97540d7573916ae9f5ae8;p=arcanist.git Fix phutil_analyzer bug on interface dependency creation Summary: Use $interface_name instead of $class_name when dealing with interfaces. Problem happens when you extend an interface: interface SubIface extends SuperIface { ... Notice: Undefined variable: class_name in ... Fatal error: Call to a member function getConcreteString() on a non-object in ... Test Plan: phutil_mapper.php works! --- diff --git a/scripts/phutil_analyzer.php b/scripts/phutil_analyzer.php index 91b253dc..c11b75d4 100755 --- a/scripts/phutil_analyzer.php +++ b/scripts/phutil_analyzer.php @@ -303,7 +303,7 @@ foreach (Futures($futures) as $file => $future) { $extends = $interface->getChildByIndex(2); foreach ($extends->selectDescendantsOfType('n_CLASS_NAME') as $parent) { $requirements->addInterfaceDependency( - $class_name->getConcreteString(), + $interface_name->getConcreteString(), $parent, $parent->getConcreteString()); }