OSDN Git Service

添付ファイルがない場合の処理
[trpgtools-onweb/cake-frame.git] / app / views / elements / home.ctp
index 538aaa4..5df547c 100644 (file)
@@ -20,8 +20,7 @@
 
        $file = $upfile->file(
                'filter/m', 
-               $target_user['Attachment'], 
-               0, 
+               CorePlus::get_value($target_user, 'Attachment.0'),
                array(
                        'model_name' => 'User', 
                        'mime_type' => 'original',
@@ -33,7 +32,7 @@
                $file,
                array(
                        'url' => $url,
-                       'alt' => $target_user['User']['name'],
+                       'alt' => CorePlus::get_value($user, 'User.name'),
                        'class' => 'shadow',
                        'id' => 'HomeUserImage',
                        'restrict' => array('image')