aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsxlib.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/gsxlib.php b/gsxlib.php
index fae862e..740323b 100644
--- a/gsxlib.php
+++ b/gsxlib.php
@@ -192,14 +192,17 @@ class GsxLib
public function createCarryInRepair($repairData)
{
- if( $repairData['fileData'] && file_exists( $repairData['fileData'] ))
+ if( array_key_exists('fileData', $repairData ))
{
$fp = $repairData['fileData'];
- $fh = fopen($fp, "r");
- $contents = fread($fh, filesize($fp));
- $repairData['fileData'] = $contents;
- $repairData['fileName'] = basename($fp);
- fclose($fh);
+ if( is_readable( $fp ))
+ {
+ $fh = fopen($fp, "r");
+ $contents = fread($fh, filesize($fp));
+ $repairData['fileData'] = $contents;
+ $repairData['fileName'] = basename($fp);
+ fclose($fh);
+ }
}
$resp = $this->client->CreateCarryInRepair(