Fix crashes related to "new Pair($x, $y)"
Summary: "new Pair" is supposed to throw an exception with any number of arguments,
However, there was a crash when running under hphpd that could happen if
one or more arguments were passed. The problem was that HHVM was raising a
warning and then returning a partially constructed Pair with uninitialized
fields.
This diff fixes the crash by making "new" use a more defensive C++
constructor that initializes all the field, and by making Pair's
__construct() method take any number of args (which ensures that "new Pair"
will always throw an exception no matter how many args are passed).
Reviewed By: @jdelong
Differential Revision:
D1432922