I got this error on a fairly standard looking number formatted as follows:
0054 11 2222 3333
Call to a member function matcher() on a non-object in libphonenumber-for-php/PhoneNumberUtil.php on line 942
The error occurs in this function:
PhoneNumberUtil->maybeStripNationalPrefixAndCarrierCode()
The work-around was to add an is_object() check so the matcher member function does not get called, but I don't know what the root cause of this problem could have been.
Hello, I'm using libphonenumber-for-php as part of the Drupal phone module (https://drupal.org/project/phone).
I got this error on a fairly standard looking number formatted as follows: 0054 11 2222 3333
Call to a member function matcher() on a non-object in libphonenumber-for-php/PhoneNumberUtil.php on line 942
The error occurs in this function: PhoneNumberUtil->maybeStripNationalPrefixAndCarrierCode()
The work-around was to add an is_object() check so the matcher member function does not get called, but I don't know what the root cause of this problem could have been.
Code before:
Code after: