forked from GNUsocial/gnu-social
		
	fixup date handling in showbookmark for PHP 5.2
This commit is contained in:
		@@ -81,8 +81,7 @@ class ShowbookmarkAction extends ShownoticeAction
 | 
			
		||||
            throw new ClientException(_('No such URL.'), 404);
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        $dt = DateTime::createFromFormat('YmdHis',
 | 
			
		||||
                                         $this->trimmed('created'),
 | 
			
		||||
        $dt = new DateTime($this->trimmed('created'),
 | 
			
		||||
			   new DateTimeZone('UTC'));
 | 
			
		||||
 | 
			
		||||
        if (empty($dt)) {
 | 
			
		||||
@@ -94,7 +93,7 @@ class ShowbookmarkAction extends ShownoticeAction
 | 
			
		||||
 | 
			
		||||
	foreach ($bookmarks as $bookmark) {
 | 
			
		||||
            $bdt = new DateTime($bookmark->created, new DateTimeZone('UTC'));
 | 
			
		||||
            if ($bdt->getTimestamp() == $dt->getTimestamp()) {
 | 
			
		||||
            if ($bdt->format('U') == $dt->format('U')) {
 | 
			
		||||
                $this->bookmark = $bookmark;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user