Error with attachment
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
#0 /usr/share/kopano-webapp/server/includes/load.php(39): include()
#1 /usr/share/kopano-webapp/index.php(167): include(’/usr/share/kopa…’)
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 ));
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?
Could be related:
I’ve added your case in the ticket, so that will be checked soon.
That is exactly the issue, thanks for fixing it .