Its my first time here! using a friends script, Its returning PHP Warning: Illegal string offset 'error' : I a using a friends script in winSCP using putty and when i do 'create' in the script, it returns this error. I REALLY need help with this please, my friend is away for a week. it directs me to 'line 86' in the php file. I have went ahead and copy and pasted the other lines surrounding line 86 to give a better idea. 

ERROR FACED:

PHP Warning:  Illegal string offset 'error' in /root/100tb/includes/100tb.php on line 86

Line 86 is- $errorMessage = (isset($result['data']['error']['message']))? $result['data']['error']['message'] : $result['data']['error'];


All help appreciated. 

     }
        }

        curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);

        $response = curl_exec($handle);
        if (isset($response[0])) {
            if ($response[0] == '[' || $response[0] == '{') {
                $response = json_decode($response, TRUE);
            }
        }

        $result = array(
            'data' => $response,
            'info' => curl_getinfo($handle),
        );

        curl_close($handle);

        if ($result['info']['http_code'] !== 200) {
            $errorMessage = (isset($result['data']['error']['message']))? $result['data']['error']['message'] : $result['data']['error'];
            throw new Exception($errorMessage,$result['info']['http_code']);
        }

        return $result['data'];
    }

