Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined Indexes #24

Closed
cziegenberg opened this issue May 7, 2014 · 12 comments
Closed

Undefined Indexes #24

cziegenberg opened this issue May 7, 2014 · 12 comments

Comments

@cziegenberg
Copy link
Contributor

I got the following errors, perhaps because I was trying it a new browser (Firefox 30 Beta 2)? Tested with PHP 5.5.11 (64 Bit), on Windows Server 2008 R2.

Notice: Undefined index: Palm Source in C:\wwwroot\tests\browser\vendor\browscap\browscap-php\src\phpbrowscap\Browscap.php on line 576
Call Stack

Time Memory Function Location

1 0.0010 240256 {main}( ) ..\index.php:0
2 0.0049 553064 phpbrowscap\Browscap->getBrowser( ) ..\index.php:7
3 0.0049 554144 phpbrowscap\Browscap->updateCache( ) ..\Browscap.php:289

Notice: Undefined index: in C:\wwwroot\tests\browser\vendor\browscap\browscap-php\src\phpbrowscap\Browscap.php on line 579
Call Stack

Time Memory Function Location

1 0.0010 240256 {main}( ) ..\index.php:0
2 0.0049 553064 phpbrowscap\Browscap->getBrowser( ) ..\index.php:7
3 0.0049 554144 phpbrowscap\Browscap->updateCache( ) ..\Browscap.php:289

And I also got a memory error (but that's another issue).

@asgrim
Copy link
Member

asgrim commented May 7, 2014

I think this might be related to browscap/browscap#259

@cziegenberg
Copy link
Contributor Author

It helps to check if the keys exists (and if not, simply ignore that part), but the detection of the beta version doesn't work:

object(stdClass)[3]
public 'browser_name' => string 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0' (length=72)
public 'browser_name_regex' => string '^mozilla/(\d).0 (.windows nt (\d).(\d).wow64.) gecko/. firefox/(\d)(\d).0._$' (length=85)
public 'browser_name_pattern' => string 'Mozilla/5.0 (Windows NT 6.1_WOW64) Gecko/* Firefox/30.0*' (length=58)
public 'Parent' => string 'Firefox 30.0' (length=12)
public 'Platform' => string 'Win7' (length=4)
public 'Platform_Version' => string '6.1' (length=3)
public 'Win32' => boolean false
public 'Win64' => boolean true
public 'Comment' => string 'Firefox 30.0' (length=12)
public 'Browser' => string 'Firefox' (length=7)
public 'Version' => string '30.0' (length=4)
public 'MajorVer' => string '30' (length=2)
public 'Frames' => boolean true
public 'IFrames' => boolean true
public 'Tables' => boolean true
public 'Cookies' => boolean true
public 'JavaScript' => boolean true
public 'JavaApplets' => boolean true
public 'CssVersion' => string '3' (length=1)
public 'MinorVer' => string '0' (length=1)
public 'Alpha' => boolean false
public 'Beta' => boolean false
public 'Win16' => boolean false
public 'BackgroundSounds' => boolean false
public 'VBScript' => boolean false
public 'ActiveXControls' => boolean false
public 'isMobileDevice' => boolean false
public 'isTablet' => boolean false
public 'isSyndicationReader' => boolean false
public 'Crawler' => boolean false
public 'AolVersion' => string '0' (length=1)

@mimmi20
Copy link
Member

mimmi20 commented May 7, 2014

The Beta Flag is not set

@cziegenberg
Copy link
Contributor Author

Ah, okay. I also just see that the user agent doesn't contain this information.

@asgrim
Copy link
Member

asgrim commented May 8, 2014

@ziege can you try reproducing with the latest release 5029 (I have just put live) and see if it fixes this? For the memory issues, please see #20

@cziegenberg
Copy link
Contributor Author

@asgrim Where do I get this release? Can't find in anywhere.

@asgrim
Copy link
Member

asgrim commented May 8, 2014

On the site, where it usually is! :) http://browscap.org/

@cziegenberg
Copy link
Contributor Author

@asgrim Ah, okay, you are talking about the INI-file... I thought you changed the PHP file. :) Will test it tomorrow.

1 similar comment
@cziegenberg
Copy link
Contributor Author

@asgrim Ah, okay, you are talking about the INI-file... I thought you changed the PHP file. :) Will test it tomorrow.

@cziegenberg
Copy link
Contributor Author

Sorry, shouldn't do that on my mobile...

@cziegenberg cziegenberg reopened this May 8, 2014
@cziegenberg
Copy link
Contributor Author

Works with the new version.

@asgrim
Copy link
Member

asgrim commented May 9, 2014

Thanks for confirming, @ziege :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants