dbo_source Bug Fixes in cakePHP 1.2.0.6311-beta
January 4th, 2008
Today at 06:00 PM when i learning new version cakePHP framework, i want to implement ACL feature. After reading some tutorial, i start to doing each steps explained by the tutorial.
I run this command, in my dos console :
cake acl create aco / ROOT and got error messages like this :
Fatal error: Undefined class name ’string’ in D:\tohtdocs\MyBand\cake\libs\model
\datasources\dbo_source.php on line 1456
This error message annoying, after asking question everywhere, i’am still stuck! no solutions. After that, i decided to visiting all of my new friends in #cakephp at IRC. Hooorraayy i was very luck because i meet very great people AD7six . He ask me for checking cake trac and ask me browse the dbo_source.php in
THE BUG FIXES
The db0_source.php bug is not too serious.. just adding this line :
uses(’String’);
at the top of all classes from dbo_source.php
looks like this :
- <?php
- /* SVN FILE: $Id: dbo_source.php 6311 2008-01-02 06:33:52Z phpnut $ */
- /**
- * Short description for file.
- *
- * Long description for file
- *
- * PHP versions 4 and 5
- *
- * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright 2005-2008, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @filesource
- * @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
- * @package cake
- * @subpackage cake.cake.libs.model.datasources
- * @since CakePHP(tm) v 0.10.0.1076
- * @version $Revision: 6311 $
- * @modifiedby $LastChangedBy: phpnut $
- * @lastmodified $Date: 2008-01-02 00:33:52 -0600 (Wed, 02 Jan 2008) $
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
- */
- uses('set');
- /**
- * DboSource
- *
- * Creates DBO-descendant objects from a given db connection configuration
- *
- * @package cake
- * @subpackage cake.cake.libs.model.datasources
- */
- class DboSource extends DataSource {
and the new with bug fixes look like this :
- <?php
- /* SVN FILE: $Id: dbo_source.php 6311 2008-01-02 06:33:52Z phpnut $ */
- /**
- * Short description for file.
- *
- * Long description for file
- *
- * PHP versions 4 and 5
- *
- * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
- * Copyright 2005-2008, Cake Software Foundation, Inc.
- * 1785 E. Sahara Avenue, Suite 490-204
- * Las Vegas, Nevada 89104
- *
- * Licensed under The MIT License
- * Redistributions of files must retain the above copyright notice.
- *
- * @filesource
- * @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
- * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
- * @package cake
- * @subpackage cake.cake.libs.model.datasources
- * @since CakePHP(tm) v 0.10.0.1076
- * @version $Revision: 6311 $
- * @modifiedby $LastChangedBy: phpnut $
- * @lastmodified $Date: 2008-01-02 00:33:52 -0600 (Wed, 02 Jan 2008) $
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
- */
- uses('set');
- uses('String'); // add this line
- /**
- * DboSource
- *
- * Creates DBO-descendant objects from a given db connection configuration
- *
- * @package cake
- * @subpackage cake.cake.libs.model.datasources
- */
- class DboSource extends DataSource {
I hope this article help you.. ![]()
Leave a Reply