$fall_back = $parent_node->fallback(); randomly crash
Posted: Mon May 08, 2017 1:18 am
When I call
I will end up it scientiamobile/wurfl-api/src/Model/AspectModelProxy.php and crash at line
with exception
However, such case only happen randomly, and I can hardly reproduce the error, even using the same user agent string.
Here's the stack trace
an example of user agent string which causes this problem is
Code: Select all
// device is built using :
//
//self::$wurfl_engine = new \ScientiaMobile\WURFL\WURFLEngine($container);
//$this->device = self::$wurfl_engine->getDeviceForUserAgent($userAgent);
$this->device->getCapability('ajax_support_javascript');
Code: Select all
$fall_back = $parent_node->fallback();
Code: Select all
BadMethodCallException
Call to a member function fallback() on a non-object (boolean)
Here's the stack trace
Code: Select all
BadMethodCallException: Call to a member function fallback() on a non-object (boolean)
#26 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Model/AspectModelProxy.php(77): getFallbackTree
#25 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Model/AspectModelProxy.php(98): getCapability
#24 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Device.php(94): getCapability
Can you provide me some hint, on what is the possible root cause?Mozilla/5.0 (Linux; Android 4.4.2; GT-I9190 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36