Skip to content
This repository was archived by the owner on Oct 26, 2020. It is now read-only.
This repository was archived by the owner on Oct 26, 2020. It is now read-only.

PHP Fatal Error – yii\base\ErrorException #55

@blu-IT

Description

@blu-IT

Hello,

I installed the module on HumHub v. 1.2.8 and activated the module for one special space for testing.
When filling in a new question and trying to save I got this error:

PHP Fatal Error – yii\base\ErrorException
Call to undefined function humhub\modules\questionanswer\models\preg_replace_callback_array()

    1. in /myserver/humhub-test/protected/modules/questionanswer/models/Hashtag.php at line 64
    55565758596061626364656667686970717273

     
        /**
         * Replace hashtags from text to link tag
         *
         * @param string $text Contains the complete message
         * @return mixed
         */
        public static function translateHashtags($text)
        {
            return preg_replace_callback_array([
     
                // Replace the '#' in HTML char codes temporarily for hashtag parsing
                Hashtag::HTML_CODE_PATTERN => function($hit) {
                    return substr_replace($hit[0], Hashtag::HASH_SYMBOL_ALT, 1, 1);
                },
     
                // Replace hashtag text with hashtag link
                Hashtag::HASHTAG_PATTERN => function($hit) {
                    return HashtagLinkWidget::widget(['hashtag' => $hit[0]]);

    2. yii\base\ErrorHandler::handleFatalError()

Returning to the stream I can see the question, but when I click on it in the stream got the same error again.

I did NOT install karma-module because I don't know what it is for. Do I really need it to get this module working?

Thanks!

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions