1
gronice
Robust handling of xoops_version.php (block details)
  • 2005/8/28 11:47

  • gronice

  • Just popping in

  • Posts: 30

  • Since: 2003/7/31


Hi,

i've got some problems with my wsProject module since the new XOOPS 2.2.x is out.
If i try to install the modul, or update it, every time installation of blocks fails.

I've traced down the problem to the sql insert/update statment in the XOOPS core.

In the modul's xoops_version.php should be set a

$modversion['blocks'][1]['description']

for each block, but it was an

$modvertion['blocks'][1]['description']

instead (simple typo).

It was realy hard to find, what goes wrong, because in versions before everything works well.
And i've assumed it is cause by any new features/changes to XOOPS 2.2


The probleme is, ['description'] was not set and your quote string function returns an empty string. This results in an SQL Error cause we got an sql query with "'blabla', , 4343".

Don't know what your project guidlines according error handling are, but think it would be nice to give an exact error if any necessary property of any $blocks[i] is not set or if it is an unimportent one, set it to a default value or try to build the sql query like "'blabla', '', 4343".

It's just an opinion :)

Kind Regards
G'Ron

Login

Who's Online

111 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 111


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits