Skip to content

Commit

Permalink
Warning was being generated when created didn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Nov 19, 2016
1 parent 9b1067f commit 0ab2595
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Data/Comment.php
Expand Up @@ -25,10 +25,14 @@ public function populate() {
$this->parseHTML();
$this->parsePreview();
$this->parseImages();
if(property_exists($this, 'created') && !is_int($this->created)) {
$this->ts = strtotime($this->created);
if(property_exists($this, 'created')) {
if(!is_int($this->created)) {
$this->ts = strtotime($this->created);
} else {
$this->ts = (string) $this->created;
}
} else {
$this->ts = (string) $this->created;
$this->ts = null;
}
}

Expand Down

0 comments on commit 0ab2595

Please sign in to comment.