Skip to content

TypeError: htmlspecialchars() expects parameter 1 to be string, int given #2727

@szaimen

Description

@szaimen

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

Don't know how to reproduce exactly. Most likely it has to do with the cronjob that tries to send activity mails.

Expected behaviour

No error report in the logs
(and an activity mail should be send)

Actual behaviour

error report in the logs

Server configuration detail

Operating system: Linux 5.4.0-54-generic nextcloud/server#60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64

Webserver: Apache (fpm-fcgi)

Database: pgsql PostgreSQL 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit

PHP version:

7.4.3
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, cgi-fcgi, json, apcu, igbinary, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, redis, ldap, exif, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, shmop, SimpleXML, smbclient, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 20.0.2 - 20.0.2.2

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 20.0.1

Where did you install Nextcloud from: Nextcloud VM

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.6.0
 - activity: 2.13.3
 - admin_audit: 1.10.0
 - apporder: 0.11.0
 - bruteforcesettings: 2.0.1
 - calendar: 2.1.2
 - cloud_federation_api: 1.3.0
 - cms_pico: 1.0.10
 - contacts: 3.4.2
 - contactsinteraction: 1.1.0
 - dashboard: 7.0.0
 - dav: 1.16.1
 - deck: 1.2.2
 - event_update_notification: 1.1.0
 - extract: 1.2.5
 - federatedfilesharing: 1.10.1
 - files: 1.15.0
 - files_external: 1.11.1
 - files_linkeditor: 1.1.2
 - files_mindmap: 0.0.23
 - files_pdfviewer: 2.0.1
 - files_readmemd: 1.2.0
 - files_rightclick: 0.17.0
 - files_sharing: 1.12.0
 - files_trashbin: 1.10.1
 - files_versions: 1.13.0
 - files_videoplayer: 1.9.0
 - forms: 2.0.4
 - geoblocker: 0.4.0
 - impersonate: 1.7.0
 - issuetemplate: 0.7.0
 - logreader: 2.5.0
 - lookup_server_connector: 1.8.0
 - maps: 0.1.8
 - metadata: 0.12.0
 - music: 0.17.3
 - nextcloud_announcements: 1.9.0
 - notifications: 2.8.0
 - oauth2: 1.8.0
 - onlyoffice: 6.1.0
 - password_policy: 1.10.1
 - photos: 1.2.0
 - polls: 1.6.2
 - previewgenerator: 3.0.1
 - provisioning_api: 1.10.0
 - rainloop: 7.0.3
 - ransomware_protection: 1.8.0
 - recommendations: 0.8.0
 - serverinfo: 1.10.0
 - settings: 1.2.0
 - spreed: 10.0.3
 - suspicious_login: 3.2.1
 - talk_simple_poll: 1.2.0
 - tasks: 0.13.6
 - text: 3.1.0
 - theming: 1.11.0
 - theming_customcss: 1.7.0
 - twofactor_nextcloud_notification: 3.0.0
 - updatenotification: 1.10.0
 - user_status: 1.0.1
 - video_converter: 0.1.5
 - viewer: 1.4.0
 - weather_status: 1.0.0
 - workflowengine: 2.2.0
Disabled:
 - bookmarks
 - comments
 - drawio
 - encryption
 - federation
 - firstrunwizard
 - notes
 - occweb
 - ocr
 - privacy
 - radio
 - sharebymail
 - support
 - survey_client
 - systemtags
 - user_ldap
 - whiteboard

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "20.0.2.2",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "log_type": "file",
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "loglevel": "2",
    "mail_smtpmode": "smtp",
    "log_rotate_size": "10485760",
    "trashbin_retention_obligation": "auto, 180",
    "versions_retention_obligation": "auto, 365",
    "simpleSignUpLink.shown": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0.5,
        "dbindex": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "logtimezone": "Europe\/Berlin",
    "htaccess.RewriteBase": "\/",
    "maintenance": false,
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "share_folder": "\/Shared",
    "enable_previews": true,
    "preview_max_x": "2048",
    "preview_max_y": "2048",
    "jpeg_quality": "60",
    "theme": "",
    "updater.release.channel": "stable",
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": [
        "disabled_twofactorauth"
    ],
    "lost_password_link": "disabled",
    "allow_user_to_change_display_name": false,
    "knowledgebaseenabled": false,
    "log.condition": {
        "apps": [
            "admin_audit"
        ]
    },
    "data-fingerprint": "***REMOVED SENSITIVE VALUE***",
    "enabledPreviewProviders": {
        "11": "OC\\Preview\\PNG",
        "12": "OC\\Preview\\JPEG",
        "13": "OC\\Preview\\GIF",
        "14": "OC\\Preview\\BMP",
        "16": "OC\\Preview\\MP3",
        "18": "OC\\Preview\\Movie"
    }
}

Are you using external storage, if yes which one: local

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.47

Operating system: As shown in the Browser useragent

Logs

Web server error log
Insert your web server log here 

Nextcloud log

TypeError: htmlspecialchars() expects parameter 1 to be string, int given

0. /var/www/nextcloud/apps/activity/lib/DigestSender.php - line 230:
htmlspecialchars()

1. /var/www/nextcloud/apps/activity/lib/DigestSender.php - line 184:
OCA\Activity\DigestSender->getHTMLSubject()

2. /var/www/nextcloud/apps/activity/lib/DigestSender.php - line 111:
OCA\Activity\DigestSender->sendDigestForUser()

3. /var/www/nextcloud/apps/activity/lib/BackgroundJob/DigestMail.php - line 47:
OCA\Activity\DigestSender->sendDigests()

4. /var/www/nextcloud/lib/private/BackgroundJob/Job.php - line 52:
OCA\Activity\BackgroundJob\DigestMail->run()

5. /var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php - line 59:
OC\BackgroundJob\Job->execute()

6. /var/www/nextcloud/cron.php - line 127:
OC\BackgroundJob\TimedJob->execute()
Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Metadata

Metadata

Assignees

No one assigned

    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