notes icon indicating copy to clipboard operation
notes copied to clipboard

Nextcloud crlon 'notes' errors logged "syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)

Open expert-geeks opened this issue 3 years ago • 0 comments

Please make a clear and concise description of what the bug is. Please note, that issues with the Android app have to be reported under https://github.com/stefan-niedermann/nextcloud-notes/issues and issues with Nextcloud's Text app have to be reported under https://github.com/nextcloud/text/issues .

Steps to reproduce

  1. Install notes
  2. Allow nextcloud cron job to run

Expected behaviour

Notes works without logging errors

Actual behaviour

Notes appears to work fine, but logs this error every time the nextcloud cron runs, parsing installed apps.
"syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)"

Screenshots

N/A

Server

Please complete the following information.

  • Notes app version: 4.5.1
  • Nextcloud version: 23.0.7/23.0.9
  • OS: Debian 10
  • Web server: nginx
  • PHP version: 7.4-fpm
  • Database: mariadb

Nextcloud configuration:

``` { "system": { "debug": false, "loglevel": 1, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "default_phone_region": "GB", "allow_local_remote_servers": true, "trusted_domains": [ "supported.redirectme.net", "192.168.42.252", "86.8.112.150" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "23.0.9.1", "overwrite.cli.url": "https:\/\/supported.redirectme.net", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "activity_expire_days": 14, "auth.bruteforce.protection.enabled": true, "blacklisted_files": [ ".htaccess", "Thumbs.db", "thumbs.db" ], "cron_log": true, "enable_previews": false, "preview_max_x": "1080", "preview_max_y": "1920", "preview_libreoffice_path": "\/usr\/bin\/libreoffice", "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\Movie", "OC\\Preview\\PDF", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown" ], "filesystem_check_changes": 0, "filelocking.enabled": "true", "htaccess.RewriteBase": "\/", "integrity.check.disabled": false, "knowledgebaseenabled": false, "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "logtimezone": "Europe\/London", "log_rotate_size": 104857600, "maintenance": false, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\Redis", "memcache.distributed": "\\OC\\Memcache\\Redis", "overwriteprotocol": "https", "preview_max_scale_factor": 1, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "quota_include_external_storage": false, "share_folder": "\/Shares", "defaultapp": "files", "skeletondirectory": "", "theme": "", "trashbin_retention_obligation": "auto, 7", "updater.release.channel": "stable", "default_locale": "en_GB", "app.mail.transport": "php-mail", "mail_smtpmode": "smtp", "mail_smtpsecure": "ssl", "mail_sendmailmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "app_install_overwrite": [ "files_external_ipfs", "mindmap_app" ], "lost_password_link": "disabled", "jpeg_quality": "60", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```

Client

Please complete the following information.

  • Browser (incl. version):
  • OS:

Log files

{"reqId":"XXXXXXXXXX","level":4,"time":"2022-09-16T21:50:01+01:00","remoteAddr":"","user":"--","app":"notes","method":"","url":"--","message":"Error during app loading: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)","userAgent":"--","version":"23.0.9.1","exception":{"Exception":"ParseError","Message":"syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":428,"function":"Composer\Autoload\includeFile","args":["/var/www/nextcloud/apps/notes/lib//AppInfo/Application.php"]},{"function":"loadClass","class":"Composer\Autoload\ClassLoader","type":"->","args":["OCA\Notes\AppInfo\Application"]},{"function":"spl_autoload_call","args":["OCA\Notes\AppInfo\Application"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":197,"function":"class_exists","args":["OCA\Notes\AppInfo\Application"]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":172,"function":"isBootable","class":"OC\AppFramework\Bootstrap\Coordinator","type":"->","args":["notes"]},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":140,"function":"loadApp","class":"OC_App","type":"::","args":["notes"]},{"file":"/var/www/nextcloud/cron.php","line":55,"function":"loadApps","class":"OC_App","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/notes/lib/AppInfo/Application.php","Line":15,"message":"Error during app loading: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)","exception":[],"CustomMessage":"Error during app loading: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)"},"id":"6324e193f0a5d"}

expert-geeks avatar Sep 16 '22 20:09 expert-geeks