Error with attachment



  • Versions
    openSUSE Tumbleweed
    Kopano 8.4.0~344-77.1
    WebApp 3.3.0.600-429.1
    Apache 2.4.25-5.1
    PHP 7.1.4-1.1

    Problem
    After attachment upload (WebApp) I always get an “HTTP 500 Internal Server Error”.

    Apache error log:
    [Thu Apr 27 18:50:04.797864 2017] [php7:error] [pid 8772] [client xxx:64308] PHP Fatal error: Uncaught Error: Using $this when not in object context in /usr/share/kopano-webapp/server/includes/upload_attachment.php:81
    Stack trace:
    #0 /usr/share/kopano-webapp/server/includes/load.php(39): include()
    #1 /usr/share/kopano-webapp/index.php(167): include(’/usr/share/kopa…’)
    #2 {main}
    thrown in /usr/share/kopano-webapp/server/includes/upload_attachment.php on line 81, referer: https://xxx/webapp/

    Workaround (disable plugin hook)
    Remove following part in /usr/share/kopano-webapp/server/includes/upload_attachment.php

                                        $GLOBALS['PluginManager']->triggerHook('server.upload_attachment.upload', array(
                                                'moduleObject' =>& $this,
                                                'tmpname'  => $attachment_state->getAttachmentPath($attachid),
                                                'name' => $filename,
                                                'size' => $FILE['size'],
                                                'sourcetype' => $sourcetype,
                                                'returnfiles' =>& $returnfiles
                                        ));
    

    Help?
    I’m not a php expert and don’t relay know what $this means in that context. Could someone help me to reenable the plugin hook?


  • Kopano

    Could be related:
    https://jira.kopano.io/browse/KW-1291

    I’ve added your case in the ticket, so that will be checked soon.



  • Hi Marty

    That is exactly the issue, thanks for fixing it :-).

    Regards


Log in to reply
 

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.