PHP warning message during 1.8/1.9/1.10/15.04 -> 15.10 upgrade of a completely new site

Bug #1509180 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Won't Fix
Low
Unassigned

Bug Description

To replicate:

1. Clean install of 15.04.3
2. Upgrade to 15.10_STABLE

Result:

The upgrade proceeds okay, but you see this warning message:

[DBG] c7 (lib/db/upgrade.php:4164) Add user_login_data table to record when a user logs in
[WAR] c7 (lib/db/upgrade.php:4178) Invalid argument supplied for foreach()
Call stack (most recent first):

    log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/aaronw/www/mahara-clients/htdocs/lib/db/upgr...", 4178) at /home/aaronw/www/mahara-clients/htdocs/lib/errors.php:441
    error(2, "Invalid argument supplied for foreach()", "/home/aaronw/www/mahara-clients/htdocs/lib/db/upgr...", 4178, array(size 18)) at /home/aaronw/www/mahara-clients/htdocs/lib/db/upgrade.php:4178
    xmldb_core_upgrade("2015030417") at /home/aaronw/www/mahara-clients/htdocs/lib/upgrade.php:359
    upgrade_core(object(stdClass)) at /home/aaronw/www/mahara-clients/htdocs/admin/upgrade.json.php:90

Revision history for this message
Aaron Wells (u-aaronw) wrote :

This problem only occurs if there is no record in the database that matches "select * from usr where deleted=0 and lastlogin is not null".

In other words, if it's a site that absolutely no one has ever logged into. So, it's only something you'll encounter if, like me, you're a dev who does a clean install from the command-line, and then upgrades.

summary: - PHP warning message during 1.8/1.9/1.10/15.04 -> 15.10 upgrade
+ PHP warning message during 1.8/1.9/1.10/15.04 -> 15.10 upgrade of a
+ completely new site
no longer affects: mahara/16.04
no longer affects: mahara/15.10
Changed in mahara:
milestone: 15.10.1 → 16.10.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → 16.10.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Changed in mahara:
status: Confirmed → Won't Fix
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 17.04.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.