Fix logic fail and unsets in DefineConstant()
commit0bfab33ce998eef85752ae022d5c684717b63c4e
authorSara Golemon <sgolemon@fb.com>
Fri, 3 May 2013 16:23:56 +0000 (3 09:23 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 6 May 2013 16:31:38 +0000 (6 09:31 -0700)
treefe0c8315f33d5a4cba6f6674907d678796bad7d3
parent59beab1596e6f73379e4fd3369e0d681ea9be629
Fix logic fail and unsets in DefineConstant()

If we infer the type, then we already know
its integer type ID.  Trying to then parse that type
leads to "Undefined type" errors (but it still functions
due to the fallthrough).

This diff skips trying to parse a known type and thus
avoids the misleading error message.

Also guard against missing funcs/consts elements in
global scope and classes.
hphp/idl/base.php