aboutsummaryrefslogtreecommitdiffstats
path: root/gsxlib.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-03-15 10:18:55 +0200
committerFilipp Lepalaan <f@230.to>2013-03-15 10:18:55 +0200
commit7b76e29ab3c9258c87f318aaa9f66e10ac976e66 (patch)
tree93f3925b2439baac4ed55afc0e29e407da79ac57 /gsxlib.php
parent6495c80513a9a89eb437d0dbdf12af790d5795f1 (diff)
downloadgsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.tar.gz
gsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.tar.bz2
gsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.zip
Don't complain about missing fileData
Diffstat (limited to 'gsxlib.php')
-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(