#5795: Fatal error: Cannot access empty property in model.php on line 880 ------------------------------------+--------------------------------------- Reporter: baurzhan | Type: Bug Status: new | Priority: High Milestone: 1.2.x.x | Component: General Version: RC3 | Severity: Normal Keywords: model, geColumnType | Php_version: PHP 5 Cake_version: | ------------------------------------+--------------------------------------- I want to use cakephp framework. But this error disappoints me. I just created simple application using scaffolld. There's my code:
{{{ class Buyer extends AppModel { var $name = 'Buyer'; } class BuyerUser extends AppModel { var $name='BuyerUser'; var $belongsTo=array('Buyer'); } class BuyersController extends AppController { var $name = 'Buyers'; var $scaffold; } }}} When I'm trying to add new buyer using "myhost/buyers/add" - I've got this error. This error caused by "isset($this->{$model})" statement in Model class getColumnType function when $model is null. This is function code: {{{ function getColumnType($column) { $db =& ConnectionManager::getDataSource($this->useDbConfig); $cols = $this->schema(); $model = null; $column = str_replace(array($db->startQuote, $db->endQuote), '', $column); if (strpos($column, '.')) { list($model, $column) = explode('.', $column); } if ($model != $this->alias && isset($this->{$model})) { return $this->{$model}->getColumnType($column); } if (isset($cols[$column]) && isset($cols[$column]['type'])) { return $cols[$column]['type']; } return null; } }}} -- Ticket URL: <https://trac.cakephp.org/ticket/5795> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---