MantisBT

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016431mantisbtinstallationpublic2013-09-30 11:572014-02-07 18:24
Reporterrddave 
Assigned Tograngeway 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.2.15 
Target Version1.2.16Fixed in Version1.2.16 
Summary0016431: Numerous "Invalid argument supplied for foreach()" errors when installing with DB script printed to screen
DescriptionNumerous PHP errors are shown in the SQL database generation script when outputting to screen.
Steps To Reproduce1. Navigate to /mantis/admin/install.php

2. Enter database (MySQL in my case) details, i.e. server, username, password and database name. Leave Admin username and password blank (will default to database details).

3. Tick to confirm "Print SQL Queries instead of Writing to the Database".

4. Click to "Install/Upgrade Database".

5. Providing database access details are correct, a SQL script will be shown. This will be speckled with PHP errors as follows:


SYSTEM WARNING: 'Invalid argument supplied for foreach()' in '/mantis/core/database_api.php' line 609


TagsNo tags attached.
Attached Filestxt file icon Mantis DB creation script.txt [^] (30,652 bytes) 2013-09-30 11:57 [Show Content]

- Relationships

-  Notes
User avatar (0038149)
dregad (developer)
2013-09-30 12:20

I can't reproduce this with 1.2.15. What are your PHP error settings like ?
User avatar (0038150)
dregad (developer)
2013-09-30 13:51
edited on: 2013-09-30 13:59

Also, are you using mysql or mysqli driver ? I did my test with mysql.

User avatar (0038153)
grangeway (developer)
2013-09-30 16:03

Well,

I've fixed the warning.

HOWEVER:

The PRINT SQL Statements stuff is broken - you'll probably find more reliable installations/upgrades by not using that functionality :)
User avatar (0038155)
dregad (developer)
2013-09-30 16:53

> PRINT SQL Statements stuff is broken

could you elaborate ?
User avatar (0038157)
dregad (developer)
2013-09-30 17:07

Beat me to the fix ;)

- Related Changesets
MantisBT: master-1.2.x 4231e1b3
Timestamp: 2013-09-30 16:01:28
Author: Paul Richards
Details ] Diff ]
"Fix" 0016431: Numerous "Invalid argument supplied for foreach()" errors when installing with DB script printed to screen
mod - core/database_api.php Diff ] File ]
MantisBT: master 811f966a
Timestamp: 2013-09-30 16:01:28
Author: Paul Richards
Committer: dregad
Details ] Diff ]
Fix 0016431: Numerous "Invalid argument supplied for foreach()" errors when installing with DB script printed to screen

Signed-off-by: Damien Regad <dregad@mantisbt.org>
mod - core/database_api.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-09-30 11:57 rddave New Issue
2013-09-30 11:57 rddave File Added: Mantis DB creation script.txt
2013-09-30 12:20 dregad Note Added: 0038149
2013-09-30 12:20 dregad Status new => feedback
2013-09-30 13:51 dregad Note Added: 0038150
2013-09-30 13:59 dregad Note Edited: 0038150 View Revisions
2013-09-30 16:03 grangeway Note Added: 0038153
2013-09-30 16:53 dregad Note Added: 0038155
2013-09-30 16:54 dregad Changeset attached => MantisBT master-1.2.x 4231e1b3
2013-09-30 17:07 dregad Note Added: 0038157
2013-09-30 17:07 dregad Status feedback => resolved
2013-09-30 17:07 dregad Fixed in Version => 1.2.16
2013-09-30 17:07 dregad Resolution open => fixed
2013-09-30 17:07 dregad Assigned To => grangeway
2013-09-30 17:07 dregad Product Version => 1.2.15
2013-09-30 17:07 dregad Target Version => 1.2.16
2013-09-30 18:58 dregad Changeset attached => MantisBT master 811f966a
2014-02-07 18:24 dregad Status resolved => closed


MantisBT 1.2.17 [^]
Copyright © 2000 - 2014 MantisBT Team
Time: 0.1247 seconds.
memory usage: 3,084 KB
Powered by Mantis Bugtracker