diff options
| author | Andrew Skalski <askalski@php.net> | 1999-09-22 20:21:40 +0000 |
|---|---|---|
| committer | Andrew Skalski <askalski@php.net> | 1999-09-22 20:21:40 +0000 |
| commit | 4a35689b48ff1e63a1be734105bd9255bbb50c36 (patch) | |
| tree | ae195a21bb5965546a579d51010698ac6aba3b22 /ext/mcal/php3_mcal.c | |
| parent | 4b0707cf329483da395d5b14789bdeccb5cb2c1d (diff) | |
| download | php-git-4a35689b48ff1e63a1be734105bd9255bbb50c36.tar.gz | |
added null-checking in make_event_object
Diffstat (limited to 'ext/mcal/php3_mcal.c')
| -rw-r--r-- | ext/mcal/php3_mcal.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/mcal/php3_mcal.c b/ext/mcal/php3_mcal.c index 4d0d8e2fbc..9cfc219e52 100644 --- a/ext/mcal/php3_mcal.c +++ b/ext/mcal/php3_mcal.c @@ -501,9 +501,12 @@ void make_event_object(pval *mypvalue,CALEVENT *event) add_assoc_object(mypvalue, "end",end); - add_property_string(mypvalue,"category",event->category,1); - add_property_string(mypvalue,"title",event->title,1); - add_property_string(mypvalue,"description",event->description,1); + if (event->category) + add_property_string(mypvalue,"category",event->category,1); + if (event->title) + add_property_string(mypvalue,"title",event->title,1); + if (event->description) + add_property_string(mypvalue,"description",event->description,1); add_property_long(mypvalue,"alarm",event->alarm); add_property_long(mypvalue,"recur_type",event->recur_type); add_property_long(mypvalue,"recur_interval",event->recur_interval); |
