facebook/php-sdk — Issue #508: FacebookApiException php segmentation fault 
Author: ponytrouble
Created: 2011-12-07 23:13:27+00:00
State: open

I'm having problems running a long series of Facebook api calls, against different Facebook objects in the same code. If there's an error with one of the calls a exception is thrown but, this causes the code to crash. The only output is "Segmentation fault."

What would cause that in the error object? The "recursion" on some errors looks unusual to me. Is there a reccomendation for fixing it?

My code: ```
// save result
if(is_object($_result) && $_result instanceof FacebookApiException) {
var_dump(method_exists($_result, 'getMessage'));
var_dump($_result->getMessage());
print "\n\n". print_r($_result, 1);
//	$_result = 'ERROR';
//	$_message = 'ERROR'. (method_exists($_result, 'getMessage') ? $_result->getMessage() : '') .' FOR: '. $data['query'];
}
$this->saveResults($data['application'], $_result);
. . . . ```
Error objects: ```
{}
bool(true)
string(47) "Invalid metric name: domain_active_users_locale"
FacebookApiException Object
(
[result:protected] => Array
*RECURSION*
[message:protected] => Invalid metric name: domain_active_users_locale
[string:private] =>
[code:protected] => 604
[file:protected] => /var/www/vhosts/springcg.com/public_html/library/facebook-php-sdk-dafef11/src/base_facebook.php
[line:protected] => 1039
[trace:private] => Array
*RECURSION*
)
```
```
bool(true)
string(54) "(#604) Invalid metric name: domain_active_users_locale"
FacebookApiException Object
(
[result:protected] => Array
(
[error] => Array
(
[message] => (#604) Invalid metric name: domain_active_users_locale
[type] => OAuthException
)

)

[message:protected] => (#604) Invalid metric name: domain_active_users_locale
[string:private] =>
[code:protected] => 0
[file:protected] => /var/www/vhosts/springcg.com/public_html/library/facebook-php-sdk-dafef11/src/base_facebook.php
[line:protected] => 1039
[trace:private] => Array
(
[0] => Array
(
[file] => /var/www/vhosts/springcg.com/public_html/library/facebook-php-sdk-dafef11/src/base_facebook.php
[line] => 744
[function] => throwAPIException
[class] => BaseFacebook
[type] => ->
[args] => Array
(
[0] => Array
(
[error] => Array
(
[message] => (#604) Invalid metric name: domain_active_users_locale
[type] => OAuthException
```