Array to string conversion - Piwik 2.16.3

I have up graded four Piwik sites and not had any issues with three of them, the last one however generated the following output when running the database upgrade:

A database upgrade is required. Execute update? (y/N) y

Starting the database upgrade process now. This may take a while, so please be patient.

    *** Update ***

    Database Upgrade Required

    Your Piwik database is out-of-date, and must be upgraded before you can continue.

    Piwik database will be upgraded from version 2.16.2 to the new version 2.16.3.

    The following dimensions will be updated: log_visit.visit_entry_idaction_url.

    The database upgrade process may take a while, so please be patient.

WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING [2016-10-03 10:28:22] /web/stats.transitionnetwork.org/piwik/libs/Zend/Db/Statement/Pdo.php(228): Notice - Array to string conversion - Piwik 2.16.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
  Executing ALTER TABLE `log_visit` MODIFY COLUMN `visit_entry_idaction_url` INTEGER(11) UNSIGNED NULL  DEFAULT NULL... Done. [1 / 1]

Piwik has been successfully updated!

It appears you have executed this update with user root:root, while your Piwik files are owned by www-data:www-data. 

To ensure that the Piwik files are readable by the correct user, you may need to run the following command (or a similar command depending on your server configuration):

$ chown -R root:root /web/stats.transitionnetwork.org/piwik

So I thought I’d best report it here… the full set of commands I ran are listed here.

This might be related to the PHP version, this is a Debian Wheezy server and the admin interface reports:

You must upgrade your PHP version in order to receive the latest Piwik update.
Piwik cannot be upgraded to the latest major version because your PHP version is too old. Please upgrade your PHP version to at least PHP 5.5.9 so your Piwik analytics data stays secure.

Piwik will stop supporting PHP 5.4 in the next major version. Upgrade your PHP to at least PHP 5.5.9, before it’s too late! The PHP version 5.4 you are using has reached its End of Life (EOL). You are strongly urged to upgrade to a current version, as using this version may expose you to security vulnerabilities and bugs that have been fixed in more recent versions of PHP.

php --version
PHP 5.4.45-0+deb7u5 (cli) (built: Aug 30 2016 20:15:34) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

I receive the same warnings but with PHP 5.6 installed (Debian Jessie).

# php --version
PHP 5.6.24-0+deb8u1 (cli) (built: Jul 26 2016 08:17:07)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Can you look in PHP info output, what is your PDO and pdo_mysql versions?

This what is related to PDOin phpinfo:

PDO

PDO support => enabled
PDO drivers => dblib, mysql, odbc, pgsql, sqlite

pdo_dblib

PDO Driver for FreeTDS/Sybase DB-lib => enabled
Flavour => freetds

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => 5.5.52

Directive => Local Value => Master Value
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock

PDO_ODBC

PDO Driver for ODBC (unixODBC) => enabled
ODBC Connection Pooling => Enabled, strict matching

pdo_pgsql

PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 9.4.8
Module version => 1.0.2
Revision =>  $Id: 0e858dd2051ca8c2fd3c781909a0670ab5fecd36 $ 

pdo_sqlite

PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.8.7.1

This is what I have:

Firing a shot in the dark - Is the default timezone set?

Piwik 2.16.5 has been released and fixes this issue. In case your Scheduled reports are not working anymore you may have to re-create them manually, or you can also restore the table piwik_report (containing your Scheduled reports definition) from a backup if you have one. We are sorry for any inconvenience caused.