Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Error reporting broken in github master and develop branch?
  • Is it just me or anyone else has this problem? In my app I have only one line in the default controller's action_index:
    throw new Exception("BLA");
    

    When I download RC2 and extract the core folder to the location it's supposed to be and I run the application I get this beautiful screen stating that an Exception has been raised and it gives me the line which raised the Exception:
    Error!
    Exception [ Error ]: BLA
    
    APPPATH/classes/controller/welcome.php @ line 32
    

    If I then go to https://github.com/fuel/core and select the 'master' branch and download the file, which at the moment of writing is: 'fuel-core-v1.0-rc2-128-g421a694.zip', and replace the core folder with the one inside the file and I run my application again (hit Ctrl+F5 to refresh without caching) I get a nasty blank page!!! Did this get broken somewhere along the way? I mean that screen is sooo helpful when debugging... now I don't get anything... not even a generic 'Fatal error' PHP message...
  • Well I've managed to identify what's the problem. It's related to issue #84 and here's a comment describing this.
  • My laptop crashed. I've lost my dev environment, and locked myself out of my github account (don't know the password). You should not have a backslash in the file spec, it should be a forward slash. If there's a need to support the backslash as a directory separator, we have to think of another way to identify the module name in the find_file() request. So to solve this issue, the error class needs fixing:
    \Fuel::find_file('views', 'errors/php_fatal_error', '.php', false, false);
    
  • I know... but this is code generated by the Fuel framework itself. I'm not trying to call the find_file() function with the error file... it's the framework that's doing it.. I've identified the line which makes the call and jschreuder has posted a workaround for the find_file() function... but if you say it shouldn't have a backslash then you'd probably want to look into error.php See https://github.com/fuel/core/issues/84#issuecomment-1091179
  • Your on a Windows platform? That's the only reason DS could be translated to a backslash, and that would mean we need to find a different method of identifying the module in a cascading file request. The current 'fixes' lead to execution of more code, which I want to avoid. Any suggestions? It needs to be a character (sequence) not present in paths or filenames.
  • Indeed I'm on a Windows platform so the DS becomes a backslash... How about a pipe for identifying namespaces?
    For example:
    find_file('classes', 'My\Complex\Namespace|My\Subfoldered\Class', '.php', [...])
    

    so the first part would be the namespace and the second path the file... including subfolders...
    $namespace --> My\Complex\Namespace
    $file --> My\Subfoldered\Class
    

    I know for sure Windows won't let you use a file or folder name with a pipe on it... I'm not sure about linux... This doesn't look so obvious at first hand because we are not accustomed to it... what does anybody think?
  • Well... I'm not sure about having Complex Namespaces as they are translated into modules... but well... I don't think complex namespaces are needed but don't know...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion