fork download
  1. <?php
  2.  
  3. if ($author->avatar) {
  4. $result['avatar_path'] = "/uploads/avatars/" . $author->avatar;
  5. } else {
  6. $result['avatar_path'] = "/uploads/avatars/default/" . $author->role . ".png";
  7. }
Success #stdin #stdout #stderr 0.02s 24400KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: author in /home/ptFqvo/prog.php on line 3
PHP Notice:  Trying to get property of non-object in /home/ptFqvo/prog.php on line 3
PHP Notice:  Undefined variable: author in /home/ptFqvo/prog.php on line 6
PHP Notice:  Trying to get property of non-object in /home/ptFqvo/prog.php on line 6