]> dev.renevier.net Git - syj.git/blobdiff - application/models/PathMapper.php
fixes php warning when uploading a file without being logged
[syj.git] / application / models / PathMapper.php
index 51c2d34ebe19c27288812aecb66f0c38e43d1a10..7f43e2239b64bae6d1187c9ea1c44f6571d77059 100644 (file)
@@ -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
         );