Inside the core file install.pgsql.inc there are 3 calls to a pg_result_error function without any arguments. However, according to official PHP documentation there must be always a required argument $result.
I've spent hard time searching the web for the explanation of an argless usage of aforementioned function, but the only sensible result all over the Net seems to be in this install.pgsql.inc file alone.
Could anyone, please, explain the semantics of calling pg_result_error function without a (supposedly) required argument? Is this an undocumented feature of PHP's pgsql support? What is the purpose in ommiting always available $result variable from a preceding statement in some function calls, while still passing it in other cases?
Thanks in advance!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 20100407-drupal-install.pgsql_.inc-pg_result_error-D6.patch | 1.96 KB | esteewhy |
Comments
Comment #1
damien tournoud commentedLooks like a bug. I can confirm from the PHP source code that the form without an argument doesn't exists. Sadly, this function is poorly designed and fails silently when called with no arguments.
Care to submit a patch to fix this glaring hole?
Comment #2
esteewhy commentedThank You, Damien, I was struggling to understand what's going on there, now it gets clearer.
Comment #3
dddave commentedComment #4
thedavidmeister commentedpatch in #2 no longer applies:
error: install.pgsql.inc Locally Modified (Based On 1.6): No such file or directory