Version 5.0.0 beta 3
This commit is contained in:
1 parent
f61b0da85d
commit
e86153356a
108 files changed
+2927
-1573
No files matched your search
@@ -1435,12 +1435,18 @@ abstract class Content extends ActiveRecord
|
||||
/**
|
||||
* Get quote and mention notifications
|
||||
*
|
||||
* @param string $content The content
|
||||
* @param string|null $content The content
|
||||
* @return array array( 'quotes' => array( ... member IDs ... ), 'mentions' => array( ... member IDs ... ), 'embeds' => array( ... member IDs ... ) )
|
||||
*/
|
||||
protected static function _getQuoteAndMentionIdsFromContent( string $content ): array
|
||||
protected static function _getQuoteAndMentionIdsFromContent( ?string $content ): array
|
||||
{
|
||||
$return = array( 'quotes' => array(), 'mentions' => array(), 'embeds' => array() );
|
||||
|
||||
/* If we have no content, don't bother with this */
|
||||
if( empty( $content ) )
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
|
||||
$document = new DOMDocument( '1.0', 'UTF-8' );
|
||||
if ( @$document->loadHTML( DOMDocument::wrapHtml( '<div>' . $content . '</div>' ) ) !== FALSE )
|
||||
|
||||
Reference in new issue
Block a user