From: arno Date: Sun, 20 Mar 2011 14:59:50 +0000 (+0100) Subject: fixes php warning when uploading a file without being logged X-Git-Tag: v0.3~9 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=d2d165910aacef01961120326452e616f53991f2 fixes php warning when uploading a file without being logged --- diff --git a/application/models/PathMapper.php b/application/models/PathMapper.php index 51c2d34..7f43e22 100644 --- a/application/models/PathMapper.php +++ b/application/models/PathMapper.php @@ -66,7 +66,7 @@ class Syj_Model_PathMapper public function save (Syj_Model_Path $path) { $data = array( 'geom'=> (string)$path->geom, - 'creator'=> $path->creator->id, + 'creator'=> $path->creator? $path->creator->id: null, 'title'=> $path->title, 'creator_ip'=> $path->creatorIp );