Part of the EllisLab Network
   
 
1.5.0.1 error reporting bug?
Posted: 06 November 2006 10:24 AM   [ Ignore ]  
Summer Student
Total Posts:  3
Joined  11-06-2006

Rick, this is my post - but I wished to thank you for a wonderful framework!

while coding an app in wee hours of the morning when one of my controllers stopped working, I thought the CI framework had a bug.  so I checked the log files and it always stopped at ‘Language Class Initialized’ message - no further messages.  Normal controller execution ofcourse has more messages.  After reviewing my code and forums and a few hours of sleep and review again, found the culprit.  an added ‘,’ during my copy and paste from another controller function.  This post is to add to the forum knowledge base and request a bug fix/feature.  Symptom is “Controller won’t load, no error messages”.

My question/comment is:  shouldn’t the framework at least kick out some syntax/parsing error?  I would think these errors should propagate upwards from the loader class. (please correct me if I’m wrong).  I’m using 1.5.0.1 of CI.  I’m not certain how 1.3.x and 1.4.x versions handled these errors.  I’m posting an example below:

The problem is the ‘,’ after ‘3’ in the array.  I’ve tested it with missing ‘;’ after a statement as well - same log info.

function index()
    
{
        $numbers
= array(
            
'one' => '1',
            
'two' => '2',
            
'three' => '3',
            );
        
$this->load->view('welcome');
    
}

Based on above code, the log file shows (does not continue past ‘Language Class’:

DEBUG - 2006-11-06 09:10:46 --> Config Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Hooks Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Router Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Output Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Input Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Global POST and COOKIE data sanitized
DEBUG
- 2006-11-06 09:10:46 --> URI Class Initialized
DEBUG
- 2006-11-06 09:10:46 --> Language Class Initialized

thanks for looking in to this.

Profile
 
 
Posted: 06 November 2006 06:41 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRank
Total Posts:  2541
Joined  12-21-2001

I think you might be encountering this bug.  It’s been fixed in the current distribution.

 Signature 
Profile
MSG
 
 
Posted: 07 November 2006 02:14 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  11-06-2006

yep… the change at line 135 of codeigniter.php from @include to include did the trick.

thanks!

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64453 Total Logged-in Users: 25
Total Topics: 80959 Total Anonymous Users: 1
Total Replies: 435682 Total Guests: 184
Total Posts: 516641    
Members ( View Memberlist )