Closed (fixed)
Project:
Database Administration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2007 at 00:03 UTC
Updated:
12 Nov 2007 at 22:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
bago commentedAt line 85 I added the $table = $tables[0] to make it work again:
Comment #2
dennys commentedThanks, it works again now.
Comment #3
jiangxijay commentedI had this exact problem, and the solution worked.
Comment #4
dwwThanks for the report and the proposed fix. However, that's not really a patch. Please see http://drupal.org/patch and attach an actual patch. Makes it much easier to review and apply the changes to the code. Thanks!
Comment #5
jiangxijay commentedMaking an official patch is beyond my very limited skills ;)
I hope bago or someone else will do so ...
Comment #6
dennys commentedHere is the patch for bago's code. Please help to review it, thanks. I use this command to generate the patch
diff -up dba.module.old dba.module > dba.diffComment #7
dwwThank for the patch. Upon closer inspection:
A) Your patch had a bunch of whitespace after the ; in the line you added.
B) I think
$table = reset($tables)is generally safer, since that will always return the first element in the array, even if the numeric indexes don't start from 0 for some reason.C) A little CVS archeology shows that this was broken by my patch for HEAD over at http://drupal.org/node/154227#comment-264226 (comment #2). I simply left out this important line of code (which is already in the version in DRUPAL-4-7) from the patch I had rolled for HEAD. Whoops. ;)
Anyway, I committed the fix using reset() to HEAD (so that DRUPAL-4-7 and HEAD are in sync again regarding this code) and all those menu items are now working in my 5.x test site.
Sorry about the bug, and thanks for the report and first try at a fix! I didn't list y'all in the CVS commit since I didn't use your code, but I totally appreciate you taking the time to find the problem and supply a patch. Hopefully the next time I'll just be able to use your patch directly and be able to put "#XXXXX by bago and dannys: Fixed ..." in the CVS log. ;)
Cheers,
-Derek
Comment #8
dwwComment #9
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.