minor fixes (prevention of warnings)

This commit is contained in:
tomash 2006-11-03 21:07:06 +00:00
parent b8d5f8d035
commit 42891b2059
1 changed files with 5 additions and 1 deletions

View File

@ -193,10 +193,11 @@ class StoredFile {
return $row;
}
if (is_null($row)) {
return PEAR::raiseError(
$r =& PEAR::raiseError(
"StoredFile::recall: fileobj not exist ($oid/$gunid)",
GBERR_FOBJNEX
);
return $r;
}
$gunid = StoredFile::_normalizeGunid($row['gunid']);
$ac =& new $className($gb, $gunid);
@ -511,6 +512,9 @@ class StoredFile {
*/
function setMime($mime)
{
if ( !is_string($mime)){
$mime = 'application/octet-stream';
}
$escapedMime = pg_escape_string($mime);
$res = $this->dbc->query("
UPDATE {$this->filesTable} SET mime='$escapedMime', mtime=now()