Skip to content
Snippets Groups Projects

fix Error 500 for interviews following move of files

Merged Henri-Damien LAURENT requested to merge 8.0.161 into master
Compare and
3 files
+ 38
2
Preferences
Compare changes
Files
3
@@ -46,7 +46,9 @@ class Class_WebService_Afi extends Class_WebService_Abstract {
TRAILER_ENABLED = 0,
TRAILER_DISABLED = 1;
protected static $_key;
protected static
$_key,
$_should_throw_error;
/** @category testing */
public static function setKey($key) {
@@ -61,6 +63,11 @@ class Class_WebService_Afi extends Class_WebService_Abstract {
}
public static function shouldThrowError($should) {
static::$_should_throw_error = $should;
}
public function getBiography($args) {
return array_merge(['statut_recherche' => 1,
'erreur' => '',
@@ -252,6 +259,10 @@ class Class_WebService_Afi extends Class_WebService_Abstract {
$url = $url_service . '?' . http_build_query($args);
if (static::$_should_throw_error)
return $response = $this->httpGet($url, $options);
try {
$response = $this->httpGet($url, $options);
static::_goGoGadgetoLog();