Revision: 1401
http://mrbs.svn.sourceforge.net/mrbs/?rev=1401&view=rev
Author: cimorrison
Date: 2010-08-06 08:39:42 +0000 (Fri, 06 Aug 2010)
Log Message:
-----------
Fixed bug which meant that the SQL error message wasn't always displayed.
Modified Paths:
--------------
mrbs/trunk/web/edit_users.php
Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php 2010-07-28 12:36:05 UTC (rev 1400)
+++ mrbs/trunk/web/edit_users.php 2010-08-06 08:39:42 UTC (rev 1401)
@@ -766,6 +766,9 @@
$r = sql_command($operation);
if ($r == -1)
{
+ // Get the error message before the print_header() call because the
print_header()
+ // function can contain SQL queries and so reset the error message.
+ $error_message = sql_error();
print_header(0, 0, 0, "", "");
// This is unlikely to happen in normal operation. Do not translate.
@@ -774,7 +777,7 @@
print " <fieldset>\n";
print " <legend></legend>\n";
print " <p class=\"error\">Error updating the $tbl_users
table.</p>\n";
- print " <p class=\"error\">" . sql_error() . "</p>\n";
+ print " <p class=\"error\">$error_message</p>\n";
print " <input type=\"submit\" value=\" " . get_vocab("ok") . "
\">\n";
print " </fieldset>\n";
print "</form>\n";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits