Skip to content

Commit

Permalink
Merge pull request FreePBX#5 in FREEPBX/superfecta from bugfix/FREEPB…
Browse files Browse the repository at this point in the history
…X-13449 to release/13.0

* commit '47134bca509bc6acaee3535fb991da989a7f3bd6':
  FREEPBX-13449 Fix GevondenCC
  • Loading branch information
tm1000 committed Feb 1, 2017
2 parents eecd375 + 47134bc commit 96e3a76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sources/source-GevondenCC_NL.module
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
*
*
*/
class GevondenCC_NL extends superfecta_base {

Expand All @@ -16,7 +16,7 @@ class GevondenCC_NL extends superfecta_base {
$caller_id = null;
$name = "";

$this->DebugPrint("Searching gevonden.cc - {$this->thenumber} ... ");
$this->DebugPrint("Searching gevonden.cc - $thenumber ... ");

// Test for NL
$loc_number = $thenumber;
Expand Down Expand Up @@ -45,10 +45,12 @@ class GevondenCC_NL extends superfecta_base {

$expr = '=<title[^>]*>(.*)[0-9]{5,}</title>=siU';
preg_match_all($expr, $result, $name);
if (count($name[1]) > 0)
if (count($name) > 1 && count($name[1]) > 0)
{
$name = trim($name[1][0]);
$name = strip_tags($name);
} else {
$name = "";
}
}
else
Expand Down

0 comments on commit 96e3a76

Please sign in to comment.