Skip to content

PHP 7.2: Count on object that does not implement countable interface #7546

@Mr-Maniac

Description

@Mr-Maniac

Steps to reproduce

  1. Upgrade Nextcloud to version 13.0.0. beta 3
  2. Access Nextcloud or wait for cron to run

Expected behaviour

Normal access to nextcloud without errors in error log

Actual behaviour

Access to nextcloud works, but there are errors in the log:
count(): Parameter must be an array or an object that implements Countable at /mnt/web/nextcloud/lib/private/legacy/db/statementwrapper.php#70

Server configuration

Operating system: Gentoo Linux

Web server: Apache 2.4

Database: PostgreSQL

PHP version: 7.2.0

Nextcloud version: 13.0.0 Beta 3

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

Where did you install Nextcloud from: Updated via web updater and initially installed via web-installer from zip package

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.6.1
  - calendar: 1.5.7
  - comments: 1.3.0
  - contacts: 2.0.1
  - dav: 1.4.5
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_pdfviewer: 1.2.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - bruteforcesettings
  - encryption
  - files_external
  - survey_client
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "REMOVED"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "",
        "htaccess.RewriteBase": "\/",
        "overwrite.cli.url": "REMOVED",
        "dbtype": "pgsql",
        "version": "13.0.0.8",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 1,
        "asset-pipeline.enabled": true,
        "default_language": "de",
        "maintenance": false,
        "theme": "",
        "mail_smtpauthtype": "LOGIN",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "updater.release.channel": "beta"
    }
}

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

Are you using encryption: no

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

Client configuration

Browser: Chromium 63.0.3239.84

Operating system: Gentoo Linux and Windows 10

Logs

Web server error log

Web server error log
No errors in error log

Nextcloud log (data/nextcloud.log)

Nextcloud log
(only pasting the last few logs since the log got pretty big)
{"reqId":"3e9iq99q8PisEvZvvx93","level":3,"time":"2017-12-16T12:30:47+00:00","remoteAddr":"fd00::a8ad:27a4:81ca:cf63","user":"--","app":"PHP","method":"REPORT","url":"\/remote.php\/dav\/calendars\/***\/personal\/","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:52.0) Gecko\/20100101 Thunderbird\/52.5.0 Lightning\/5.4.5","version":"13.0.0.8"}
{"reqId":"p2aQs0S8rhuYtI682d6Y","level":3,"time":"2017-12-16T12:45:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"--","version":"13.0.0.8"}
{"reqId":"p2aQs0S8rhuYtI682d6Y","level":3,"time":"2017-12-16T12:45:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Narrowing occurred during type inference. Please file a bug report on bugs.php.net at \/mnt\/web\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"--","version":"13.0.0.8"}
{"reqId":"NJnCBZKUvkLl3fzscD7A","level":3,"time":"2017-12-16T12:45:47+00:00","remoteAddr":"fd00::a8ad:27a4:81ca:cf63","user":"--","app":"PHP","method":"REPORT","url":"\/remote.php\/dav\/calendars\/***\/geburtstage\/","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:52.0) Gecko\/20100101 Thunderbird\/52.5.0 Lightning\/5.4.5","version":"13.0.0.8"}
{"reqId":"1E0f7B8ugMKHZIzyCpHw","level":3,"time":"2017-12-16T12:45:47+00:00","remoteAddr":"fd00::a8ad:27a4:81ca:cf63","user":"--","app":"PHP","method":"REPORT","url":"\/remote.php\/dav\/calendars\/***\/personal\/","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:52.0) Gecko\/20100101 Thunderbird\/52.5.0 Lightning\/5.4.5","version":"13.0.0.8"}
{"reqId":"gSJBAQwjSDMkNryWbVcY","level":3,"time":"2017-12-16T12:45:47+00:00","remoteAddr":"fd00::a8ad:27a4:81ca:cf63","user":"--","app":"PHP","method":"REPORT","url":"\/remote.php\/dav\/calendars\/***\/gamescom\/","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:52.0) Gecko\/20100101 Thunderbird\/52.5.0 Lightning\/5.4.5","version":"13.0.0.8"}
{"reqId":"ZqRiXpkGNfYiucgYLEOB","level":3,"time":"2017-12-16T12:45:49+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Narrowing occurred during type inference. Please file a bug report on bugs.php.net at \/mnt\/web\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"--","version":"13.0.0.8"}
{"reqId":"ZqRiXpkGNfYiucgYLEOB","level":3,"time":"2017-12-16T12:45:50+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"--","version":"13.0.0.8"}
{"reqId":"QwsE4ghJm5dwPeSVG51e","level":3,"time":"2017-12-16T12:46:40+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Narrowing occurred during type inference. Please file a bug report on bugs.php.net at \/mnt\/web\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"--","version":"13.0.0.8"}
{"reqId":"QwsE4ghJm5dwPeSVG51e","level":3,"time":"2017-12-16T12:46:40+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"count(): Parameter must be an array or an object that implements Countable at \/mnt\/web\/nextcloud\/lib\/private\/legacy\/db\/statementwrapper.php#70","userAgent":"--","version":"13.0.0.8"}

Browser log

Browser log
Not a client issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions