diff options
author | Filipp Lepalaan <f@230.to> | 2013-03-15 10:18:55 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-03-15 10:18:55 +0200 |
commit | 7b76e29ab3c9258c87f318aaa9f66e10ac976e66 (patch) | |
tree | 93f3925b2439baac4ed55afc0e29e407da79ac57 | |
parent | 6495c80513a9a89eb437d0dbdf12af790d5795f1 (diff) | |
download | gsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.tar.gz gsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.tar.bz2 gsxlib-7b76e29ab3c9258c87f318aaa9f66e10ac976e66.zip |
Don't complain about missing fileData
-rw-r--r-- | gsxlib.php | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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( |