EDatePicker weirdness

hello,

I’m using EDatePicker and encountered the following issue.

I have a search form which was originally built-in on my list view. (everything was working at this point)

I decided to move it out and use the renderPartial() method.

Under my dev environment (windows xp) everything is still working fine. However, when I put the app on my "production" env (linux), I got the following error and the whole script stops (of course).

Has anybody seen this before?

Description





Invalid argument supplied for foreach()


Source File





blahblahblah/blahblah/protected/extensions/jui/EDatePicker.php(546)





00534:             break;


00535: 


00536:          case 'imagebutton':


00537:             if ($this->image === '') {


00538:                $this->image = $this->baseUrl.'/images/calendar.gif';


00539:             }


00540:             $options['showOn'] = "'" . $this->showOn . "'";


00541:             $options['buttonImage'] = "'" . $this->image . "'";


00542:             $options['buttonImageOnly'] = 'true';


00543:             break;


00544:       }


00545: 


00546: foreach ($this->callbacks as $key=>$val) {


00547:          $options['callback_'.$key] = $key;


00548:       }


00549: 


00550:       $encodedOptions = self::encode(array_merge($options, $this->options));


00551:       


00552:       foreach ($this->callbacks as $key=>$val) {


00553:          $encodedOptions = str_replace("callback_{$key}:{$key}", "{$key}: {$val}", $encodedOptions);


00554:       }


00555: 


00556:       return $encodedOptions;


00557:    }


00558: 





thanks,

–iM

There can be only ONE!

so far I found out that only one EDatePicker can be on the page (I need two for a date range).

It’s just weird that it works on Windows but not on Linux? Why? WHY?

keep looking :confused:

I found this HACK, but it won’t work for ppl who trying to use callbacks :(

http://www.yiiframew…55.html#msg9455

i

alright,

it has NOTHING to do with the OS. It works fine after you comment those lines out, mentioned above.

OR

you can try to set :

error_reporting(E_WARNING);

NOT RECOMMENDED, but puts out the fire …

i