From: Florent Bruneau Date: Sat, 10 Apr 2010 11:52:39 +0000 (+0200) Subject: Fix warning when a profile has no promo. X-Git-Tag: xorg/1.0.0~306 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=39e2c58c3c95dba85134a4a63433512dca8d3aec;p=platal.git Fix warning when a profile has no promo. Signed-off-by: Florent Bruneau --- diff --git a/classes/profile.php b/classes/profile.php index c2cb842..5ad9c54 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -197,7 +197,11 @@ class Profile public function mainEducation() { - return $this->promo{0}; + if (empty($this->promo)) { + return null; + } else { + return $this->promo{0}; + } } public function mainEducationDuration()