Ticket #445: 445-jSession-no-session-for-cmdline-requests.diff

File 445-jSession-no-session-for-cmdline-requests.diff, 0.7 kB (added by Julien, 10 months ago)
  • lib/jelix/core/jSession.class.php

    old new  
    2525     * start a session 
    2626     */ 
    2727    public static function start(){ 
     28 
     29        // do not start the session if the request is made from the command line 
     30        if($GLOBALS['gJCoord']->request instanceof jCmdLineRequest){ 
     31            return false; 
     32        } 
     33 
    2834        $params = $GLOBALS['gJConfig']->sessions; 
    2935 
    3036        if(isset($params['storage'])){ 
     
    6167            } 
    6268            session_name($params['name']); 
    6369        } 
    64          
     70 
    6571        session_start(); 
    6672        return true; 
    6773    } 
Download in other formats: Original Format