Recibe nuestro newsletter:
Contraseña:
Usuario:
X
EXPERIENCIA
................................................................................
X
ACEPTAR
PHP Error

PHP Error

Undefined variable: ub

/var/www/html/dolce-gusto_com_py/protected/helpers/HelperFunctions.php(356)

344         elseif(preg_match('/Opera/i',$u_agent))
345         {
346             $bname = 'Opera';
347             $ub = "Opera";
348         }
349         elseif(preg_match('/Netscape/i',$u_agent))
350         {
351             $bname = 'Netscape';
352             $ub = "Netscape";
353         }
354             
355         // finally get the correct version number
356         $known = array('Version', $ub, 'other');
357         $pattern = '#(?<browser>' . join('|', $known) .
358         ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
359         if (!preg_match_all($pattern, $u_agent, $matches)) {
360             // we have no matching number just continue
361         }
362             
363         // see how many we have
364         $i = count($matches['browser']);
365         if ($i != 1) {
366             //we will have two since we are not using 'other' argument yet
367             //see if version is before or after the name
368             if (strripos($u_agent,"Version") < strripos($u_agent,$ub)){

Stack Trace

#0
+
 /var/www/html/dolce-gusto_com_py/protected/models/Sessions.php(106): HelperFunctions::getBrowser()
101         
102         public static function create(){
103             $session = new Sessions;
104             $session->session = Yii::app()->session->sessionID;
105             $session->ip = HelperFunctions::getIP();
106             $session->browser = HelperFunctions::getBrowser();
107             $session->referrer = substr(HelperFunctions::getReferrer(),0,256);
108             $session->date = HelperFunctions::getDate();
109             if($session->ip!='192.252.218.60')
110                 if($session->save()){
111                     Yii::app()->session['set'] = true;
#1
+
 /var/www/html/dolce-gusto_com_py/index.php(31): Sessions::create()
26 
27 require_once($yii);
28 Yii::createWebApplication($config)->run();
29 
30 if(!isset(Yii::app()->session['set'])){
31     Sessions::create();
32 }
2015-05-28 02:42:40 Apache Yii Framework/1.1.7