DISQUS

gianni's picture

Unregistered

Feeds

aliases

  • gianni

gianni

3 months ago

in ZF Community/CMS Bugfixes on ProDevTips
Some immediate problem to make code workink.
1-
[14-Aug-2008 15:10:58] PHP Fatal error: Call to undefined method User::fetchRowToArr() in C:\wamp\www\zfcms\classes\ExtController.php on line 291

missed from .classes\ExtModel.php function fetchRowToArrow ...
i find that function in Wrinting a Cms/coomunity .... : Part 2 and added at the end of file

function fetchRowToArr($id_value = false, $as_array = true, $id_field = false, $where = false){
if($where != false){
$where_sql = array();
foreach($where as $field => $value)
$where_sql[] = $this->getAdapter()->quoteInto("$field = ?", $value);
$row = $this->fetchRow($where_sql);
}else if($id_field == false){
$row = $this->find($id_value)->current();
}else{
$where = $this->getAdapter()->quoteInto("$id_field = ?", $id_value);
$row = $this->fetchRow($where);
}

if($as_array == true && $row != false)
return $row->toArray();
else
return $row;
}

2-
[15-Aug-2008 15:46:38] PHP Fatal error: Class 'Zend_Mail' not found in C:\wamp\www\zfcms\controllers\UserController.php on line 208
[15-Aug-2008 16:17:11] PHP Fatal error: Class 'Zend_Mail_Transport_Smtp' not found in C:\wamp\www\zfcms\controllers\UserController.php on line 209

in .index.php we must load zend module for mail

// added by rg
Zend_Loader::loadClass('Zend_Mail');
Zend_Loader::loadClass('Zend_Mail_Transport_Smtp');

3- investigation about
[15-Aug-2008 16:04:49] PHP Fatal error: Call to undefined method User::updateMe() in C:\wamp\www\zfcms\controllers\UserController.php on line 150

Function already in the pencil ???

hope this can help someone - thank for the excellent job done

Gianni
Returning? Login