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

fix #928 : make compatible to extends #936

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions Mobile_Detect.php
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,10 @@ public static function getMobileDetectionRules()

if (!$rules) {
$rules = array_merge(
self::$phoneDevices,
self::$tabletDevices,
self::$operatingSystems,
self::$browsers
static::getPhoneDevices(),
static::getTabletDevices(),
static::getOperatingSystems(),
static::getBrowsers()
);
}

Expand All @@ -1208,11 +1208,11 @@ public function getMobileDetectionRulesExtended()
if (!$rules) {
// Merge all rules together.
$rules = array_merge(
self::$phoneDevices,
self::$tabletDevices,
self::$operatingSystems,
self::$browsers,
self::$utilities
static::getPhoneDevices(),
static::getTabletDevices(),
static::getOperatingSystems(),
static::getBrowsers(),
static::getUtilities()
);
}

Expand Down Expand Up @@ -1406,7 +1406,7 @@ public function isTablet($userAgent = null, $httpHeaders = null)

$this->setDetectionType(self::DETECTION_TYPE_MOBILE);

foreach (self::$tabletDevices as $_regex) {
foreach (static::getTabletDevices() as $_regex) {
if ($this->match($_regex, $userAgent)) {
return true;
}
Expand Down Expand Up @@ -1531,7 +1531,7 @@ public function version($propertyName, $type = self::VERSION_TYPE_STRING)
$type = self::VERSION_TYPE_STRING;
}

$properties = self::getProperties();
$properties = static::getProperties();

// Check if the property exists in the properties array.
if (true === isset($properties[$propertyName])) {
Expand Down