Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Undeclared Attributes and Options

2007-04-30
2013-04-25
  • The option and attribute calls makes pixie segfalt if I am trying to get an undeclared user attribute or option. I thing it should return empty instead.

     
    • George Harker
      George Harker
      2007-05-01

      Hi AKHmetgaleev,

      I can't recreate this.  The option() and attribute() sl calls should return a 0 if they can't find the attribute/ option or the types don't match.

      This seems to be working correctly for me.

      I checked with vanilla attributes / options and also user attributes / options.  If the attribute / option is not found, the value that's already set should be left alone:

      string dummy=""';
      option("user:foo",dummy);

      should leave dummy set to "".

      Do you have a small example of the crash?

      Thanks

      George

       
    • I'm just forgot to assign default value.
      - string dummy="";
      + string dummy;// <- this is my mistake
      option("user:foo",dummy);

      With dummy="" all works fine.