Plugin Directory

Changeset 2154537


Ignore:
Timestamp:
09/11/2019 03:58:09 AM (7 years ago)
Author:
deller21
Message:

fix error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • recobox/trunk/admin/class-rcb-comments-admin.php

    r2019500 r2154537  
    495495        if (count($comments) > 0) {
    496496            foreach ($comments as $comment) {
    497                 $created = new DateTime($comment->comment_date);
     497                $created = $comment->comment_date ? new DateTime($comment->comment_date) : new DateTime();
    498498                $toRecoboxArray['comments'][] = [
    499499                    'id' => $comment->comment_ID,
     
    506506                        'id' => $comment->user_id > 0 ? $comment->user_id : null,
    507507                        'name' => $comment->comment_author,
    508                         'email' => $comment->comment_author_email,
     508                        'email' => $comment->comment_author_email ? $comment->comment_author_email : 'default@' . str_replace('www.', '', $_SERVER['HTTP_HOST']),
    509509                    ]
    510510                ];
Note: See TracChangeset for help on using the changeset viewer.