Wrox Programmer Forums
|
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 31st, 2008, 09:04 AM
Registered User
 
Join Date: Dec 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default controllers/welcome.php throwing error

Hi everyone,

I was hoping that someone could shed some light on this issue.

I get this error when viewing the main template.

A PHP Error was encountered

Severity: Notice
Message: Undefined property: Welcome::$MProducts
Filename: controllers/welcome.php
Line Number: 13


Fatal error: Call to a member function getMainFeature() on a non-object in C:\xampp\htdocs\codeigniter\system\application\con trollers\welcome.php on line 13


I have reached page 108 and have used the latest correct code.

Please help. Everything works if I take away...

Code:
$data['mainf'] = $this->MProducts->getMainFeature();
        $skip = $data['mainf']['id'];
        $data['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
        $data['main'] = 'home';
Thanks,
Clinton
 
Old January 1st, 2009, 08:26 PM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Is this the same issue you posted over on http://codeigniter.com/forums/viewthread/100984/

If so, it would be great if you shared your resulution from there with the p2p.wrox.com forums crowd too. Thanks!
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!
 
Old January 2nd, 2009, 07:28 AM
Registered User
 
Join Date: Dec 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Apologies.

In the autoload file I had 'mproducts' instead of "MProducts". such a simple thing that took sooo long to remedy, but that's all part of the learning process I suppose...I'll know in future.

Best,
Clinton
 
Old January 2nd, 2009, 10:17 AM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Glad you got this solved, hope you find the book useful!
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!
 
Old March 16th, 2009, 10:09 AM
Wrox Author
 
Join Date: May 2008
Posts: 53
Thanks: 0
Thanked 5 Times in 5 Posts
Default

This is something that has come up on other projects of mine, and have since gone to a full lowercase naming convention for models. I've asked the codeigniter guys about it, I t hink they're going to address it in an upcoming release.
__________________
Thomas Myer
Author, Professional CodeIgniter
http://www.tripledogs.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Controllers chillbill7 BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 1 March 16th, 2009 10:13 AM
Throwing error back to main thread AgentSmith General .NET 0 April 26th, 2006 09:14 AM
Rails: move flash between controllers ciderpunx Ruby 2 March 7th, 2006 08:25 PM
Error catching and throwing - code rjp Access VBA 1 August 25th, 2004 08:32 PM
throwing exceptions...!? jacob ASP.NET 1.0 and 1.1 Basics 3 October 9th, 2003 03:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.