diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-01-18 18:45:08 +0300 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-01-18 19:05:16 +0300 |
commit | a0c820ab820600ee076a5b05b102f5624d93fc1a (patch) | |
tree | d14a7fcceb867d5f50cee6afb9ae065bb82ae126 /controller | |
parent | 100308b9ec01f6482cc09239df5e61a9acd2895e (diff) |
Fix unchecked variable in controller when getting photos
* Also Typo fixes on dbmappers
Diffstat (limited to 'controller')
-rw-r--r-- | controller/smscontroller.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/controller/smscontroller.php b/controller/smscontroller.php index a1b260c..29fe031 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -214,7 +214,14 @@ class SmsController extends Controller { $fmtPN2 = preg_replace("#\/#","", $fmtPN); $contacts[$fmtPN] = $contactsSrc[$fmtPN]; $contacts[$fmtPN2] = $contactsSrc[$fmtPN]; - $photos[$fmtPN] = $photosSrc[$fmtPN]; + + if (isset($photosSrc[$contacts[$fmtPN]])) { + $photos[$contacts[$fmtPN]] = $photosSrc[$contacts[$fmtPN]]; + } + + if (isset($photosSrc[$contacts[$fmtPN2]])) { + $photos[$contacts[$fmtPN2]] = $photosSrc[$contacts[$fmtPN2]]; + } } } |