From: Jehan-Guillaume (i. de R. <io...@fr...> - 2013-02-07 12:37:30
|
On 01/02/2013 12:07, Jehan-Guillaume (ioguix) de Rorthais wrote: > On 01/02/2013 11:19, Ian Lawrence Barwick wrote: >> Hi >> >> I was just poking about at this bytea problem with a sharp pointy >> stick (no useful insights so far) and came across another issue, >> namely after editing a row and clicking "save", the "edit" and >> "action" buttons no longer work, and I see a bunch of these >> errors: > > I just started to work on this bytea bug as well this morning and > found this bug as well. > > As far as I could dig around this, I think the bug was introduced by > this patch: e1a5b9c5 (git show e1a5b9c5). > > Enable plugin Report and mess around with it if you need to have a > better understanding about what this patch tries to achieve. > >> "Notice: Array to string conversion in >> /opt/www/localhost/htdocs/phppgadmin/classes/Misc.php on line >> 1796" >> >> The "edit" link generated after saving the record does not work. > > yeah, confirmed. > >> This occurs in PHP 5.4.x using current git master. > > I don't think this bug is related to a specific PHP version. > >> It looks like the parameters from the POST request are being used >> indiscriminately to populate the links, in display.php/ >> doBrowse(). The array errors are ugly but don't appear to be >> critical; the actual problem seems to be that the generated link >> contains "action=editrow", rather than what appears to be the >> correct "action=confeditrow". >> >> I'm not entirely sure how the code fits together right now so >> haven't got any patches. Possibly the links should be generated >> using a whitelist to select the parameters to be used? > > Mh, the problem is that we don't know what parameters plugins will > have to add, and I'm not sure we should add a specific API to allow > them to register parameters to this whitelist. > > This part of the code need some more thoughts and refactoring, for sure: > > + // Build array OF parameters for sorts/pages links > + $_gets = $_REQUEST; > + unset($_gets['query']); > + unset($_gets['MAX_FILE_SIZE']); I am considering to revert this patch to original code and find another cleaner way to make the plugin Reports works correctly. Thoughts ? > > This display.php and sql.php are total mess... :/ > > > As a side note, I'll be at Fosdem this week-end, not sure I'll be able > to answer during next few days but I'll do my best... > > Cheers, > >> Regards >> >> Ian Barwick |