|
From: Chris W. <ch...@cw...> - 2002-08-12 03:58:15
|
On Sat, 2002-08-10 at 09:43, Hal Finkel (DiscoverNet Inc.) wrote: > Thank you for the reply, overall OpenInteract/SPOPS are excellent pieces of > software. I have not had any problems since I made the change mentioned in > the bug report. I am sorry I did not make it more clear... there was no > problem editing objects... the problem was in creating objects (any objects, > not just theme objects... the theme object was simple the example I > provided). The problem comes because the <input type="hidden" > name="theme_id" value=""> when creating a new object is not undef, but an > empty string as returned by $apr->param( 'theme_id' );. Thus the change > from testing for a non-zero vale to testing for a defined value, causes > SPOPS::DBI::fetch to attempt to fetch an object when passed the empty string > as an id (instead of returning undef). I understand the that rationale > behind the change might have been to allow the id '0' (or an empty string > for that matter) to be used, which is fine, however the current OpenInteract > base_* packages depend on the fact the passing an empty string to the fetch > function will return undef allowing them to create a new object. I was > testing this using OI 1.40 (and MS IE, if that makes any difference). Ah, I see what you're saying, and you're absolutely right. I fixed this in the base_theme package (and it should be fixed everywhere else, but...) and added a check in SPOPS::DBI for the length() of the ID passed in -- this will take care of the empty ID issue. This modification is in 0.64 which should be rolling around CPAN right now. (It has been the weekend of many releases...) You can also get it from the Sourceforge site. Thanks for the report! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |