facebook/hhvm — pull request #2629 by johnnywalker (2014-05-07 17:35:12+00:00)
Title: Magento fixes

This PR fixes a handful of Zend SOAP tests that specifically affect Magento. It may need to be split into multiple commits, but I was in a bit of a hurry.

Summary:
* Typo in the XML response code - the `itemType` attribute was getting the `arraySize` value instead of the type.
```C++
- replaced.c_str());
+ array_type.c_str());
```
* Not using `soap_obj` passed as argument to `valid_function()` when type is `SOAP_CLASS`. This caused null pointer exceptions in Magento's SOAP API.
```
- if (server->m_type == SOAP_OBJECT || server->m_type == SOAP_CLASS) {
+ if (server->m_type == SOAP_OBJECT) {
```
* Fixed unrelated Zend SOAP test to allow throwing SoapFault exceptions from XML mapping functions
```
+ } catch (Object &e) {
+ if (e->o_instanceof("SoapFault")) {
+ send_soap_server_fault(function, e, NULL);
+ return;
+ }
+ throw e;
```