From 0eab28fe1bf1ccedabc97540d7573916ae9f5ae8 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Wed, 10 Aug 2011 11:50:10 -0300 Subject: [PATCH] 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! --- scripts/phutil_analyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); }