← Back to team overview

phpdevshell team mailing list archive

[Bug 932577] Re: getSettings should not return undefined settings, it should set it to NULL

 

I would say that your script breaks when you're trying to use your
settings variables.

The normal working of PHP is to emit a warning when the code is using an
undefined variable, which may be caught by the framework as an error
(depending on your configuration).

It's actually a good thing (your code should use undefined variables and
should not generate warnings), and the way you dealt with it is good
programming.

I think it's not a problem with the framework.

-- 
You received this bug notification because you are a member of
PHPDevShell, which is subscribed to PHPDevShell.
https://bugs.launchpad.net/bugs/932577

Title:
  getSettings should not return undefined settings, it should set it to
  NULL

Status in Open Source PHP RAD Framework with UI.:
  New

Bug description:
  When i try to make a configuration to set some settings, but the
  settings do not exist at this time. I must set the settings Like this
  to handle it:

  $setting = $this->db->getSettings(array('cfg1', 'cfg2'), 'cfgTest');
  $setting2 = array('cfg1'=>NULL, 'cfg2'=>NULL);

  $setting = array_merge($setting2, $setting);

  
  Otherwise, it destroys the layout of the page, when i do not handle it like this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/phpdevshell/+bug/932577/+subscriptions


References