Преглед изворни кода

ZF-11112
Zend_Translate
Zend_Translate_Adapter emits notice when 'content' option is not provided to addTranslation()


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23962 44c647ce-9c0f-0410-b52a-842ac1e357ba

adamlundrigan пре 14 година
родитељ
комит
37ecc2fcbe
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      library/Zend/Translate/Adapter.php

+ 5 - 0
library/Zend/Translate/Adapter.php

@@ -212,6 +212,11 @@ abstract class Zend_Translate_Adapter {
         } else if (!is_array($options)) {
             $options = array('content' => $options);
         }
+        
+        if (!isset($options['content']) || empty($options['content'])) {
+            require_once 'Zend/Translate/Exception.php';
+            throw new Zend_Translate_Exception("Required option 'content' is missing");
+        }
 
         $originate = null;
         if (!empty($options['locale'])) {