在PHP中删除通知
问题描述:
我正在使用Zend Framework版本1.10.7创建一个。但是,我收到了一个令我讨厌的通知,我想要让Rid摆脱困境。该通知意味着我有一个数组问题。我只是无法找到它在哪里。 任何帮助,想法?在PHP中删除通知
Notice: Array to string conversion in /var/www/Zend/ZendFramework-1.10.7/library/Zend/View/Helper/HtmlElement.php on line 104
Call Stack
# Time Memory Function Location
1 0.0003 327592 {main}() ../index.php:0
2 0.0011 336304 require('/var/www/nrka2/application/application.php') ../index.php:2
3 0.3390 6787492 Zend_Application->run() ../application.php:24
4 0.3391 6787492 Zend_Application_Bootstrap_Bootstrap->run() ../Application.php:366
5 0.3399 6787564 Zend_Controller_Front->dispatch() ../Bootstrap.php:97
6 0.3559 7143808 Zend_Controller_Dispatcher_Standard->dispatch() ../Front.php:954
7 0.7416 10514760 Zend_Controller_Action->dispatch() ../Standard.php:295
8 0.7429 10520540 Zend_Controller_Action_HelperBroker->notifyPostDispatch() ../Action.php:523
9 0.7432 10521780 Zend_Controller_Action_Helper_ViewRenderer->postDispatch() ../HelperBroker.php:277
10 0.7438 10521780 Zend_Controller_Action_Helper_ViewRenderer->render() ../ViewRenderer.php:957
11 0.7505 10522008 Zend_Controller_Action_Helper_ViewRenderer->renderScript() ../ViewRenderer.php:918
12 0.7508 10522008 Zend_View_Abstract->render() ../ViewRenderer.php:897
13 0.7512 10563268 Zend_View->_run() ../Abstract.php:880
14 0.7515 10564596 include('/var/www/nrka2/application/modules/eventManager/views/scripts/user/register.phtml') ../View.php:108
15 0.7516 10564596 Zend_Form->__toString() ../Form.php:0
16 0.7516 10564596 Zend_Form->render() ../Form.php:2903
17 0.7554 10565984 Zend_Form_Decorator_FormElements->render() ../Form.php:2887
18 0.7982 10778164 Zend_Form_Element->render() ../FormElements.php:101
19 0.8043 10780436 Zend_Form_Decorator_ViewHelper->render() ../Element.php:2020
20 0.8135 10814136 Zend_View->formText() ../ViewHelper.php:246
21 0.8136 10814584 Zend_View_Abstract->__call() ../Abstract.php:0
22 0.8139 10814912 call_user_func_array () ../Abstract.php:342
23 0.8139 10815356 Zend_View_Helper_FormText->formText() ../Abstract.php:0
24 0.8158 10818276 Zend_View_Helper_HtmlElement->_htmlAttribs() ../FormText.php:79
25 0.8161 10818896 implode () ../HtmlElement.php:104
更新:
我发现这个代码是造成我的麻烦:
$this->addElement('text','usr_surname', array(
'valdators' => array(
'Alpha',
array('StringLength',true,array(3,128))
),
'required' => true,
'label' => 'lastname',
'filters' => array('StringTrim')
));
答
你拼错 '验证器':
$this->addElement('text','usr_surname', array(
'validators' => array(
'Alpha',
array('StringLength',true,array(3,128))
),
'required' => true,
'label' => 'lastname',
'filters' => array('StringTrim')
));
已经看到它。但我不使用dojo。已更新我的帖子。 – sanders 2010-08-17 16:04:14
我怀疑dojo正在调用核心(引发此错误的助手在哪里),以便错误重现有或没有dojo。 – akonsu 2010-08-17 16:15:17
我会尝试调试并查看它试图转换的值。 – akonsu 2010-08-17 16:25:51