guiltar
Well-known member
Class XenForo_Search_SourceHandler_MySqlFt has method
Notice that getMetadataKey can return array and this causes error while imploding $metadataPieces.
PHP:
public function insertIntoIndex($contentType, $contentId, $title, $message, $itemDate, $userId, $discussionId = 0, array $metadata = array())
{
$metadataPieces = array(
$this->getMetadataKey('user', $userId),
$this->getMetadataKey('content', $contentType)
);
foreach ($metadata AS $metadataKey => $value)
{
$metadataPieces[] = $this->getMetadataKey($metadataKey, $value);
}
$db = $this->_getDb();
$row = '(' . $db->quote($contentType) . ', ' . $db->quote(intval($contentId))
. ', ' . $db->quote($title) . ', ' . $db->quote($message)
. ', ' . $db->quote(implode(' ', $metadataPieces))
. ', ' . $db->quote(intval($itemDate)) . ', ' . $db->quote(intval($userId))
. ', ' . $db->quote(intval($discussionId)) . ')';
PHP:
* @return string|array String if $value was a string, array if $value was an array
*/
public function getMetadataKey($keyName, $value)
{
Notice that getMetadataKey can return array and this causes error while imploding $metadataPieces.