diff --git a/phpQuery/phpQuery/phpQueryObject.php b/phpQuery/phpQuery/phpQueryObject.php index 9693cb9..3f1d26d 100644 --- a/phpQuery/phpQuery/phpQueryObject.php +++ b/phpQuery/phpQuery/phpQueryObject.php @@ -3069,7 +3069,7 @@ protected function getNodeXpath($oneNode = null, $namespace = null) { : "{$node->tagName}[{$i}]"; $node = $node->parentNode; } - $xpath = join('/', array_reverse($xpath)); + $xpath = implode('/', array_reverse($xpath)); $return[] = '/'.$xpath; } return $oneNode @@ -3091,7 +3091,7 @@ public function whois($oneNode = null) { .($node->getAttribute('id') ? '#'.$node->getAttribute('id'):'') .($node->getAttribute('class') - ? '.'.join('.', split(' ', $node->getAttribute('class'))):'') + ? '.'.implode('.', explode(' ', $node->getAttribute('class'))):'') .($node->getAttribute('name') ? '[name="'.$node->getAttribute('name').'"]':'') .($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') === false diff --git a/phpQuery/phpQuery/plugins/WebBrowser.php b/phpQuery/phpQuery/plugins/WebBrowser.php index 6688d3f..4b284af 100644 --- a/phpQuery/phpQuery/plugins/WebBrowser.php +++ b/phpQuery/phpQuery/plugins/WebBrowser.php @@ -397,7 +397,7 @@ function resolve_url($base, $url) { $path[] = $end; } // Step 6h - $base['path'] = join('/', $path); + $base['path'] = implode('/', $path); } // Step 7 diff --git a/test-cases/xpath.php b/test-cases/xpath.php index aaa05d1..7809219 100644 --- a/test-cases/xpath.php +++ b/test-cases/xpath.php @@ -15,7 +15,7 @@ function whois($nodeList) { .($node->getAttribute('id') ? '#'.$node->getAttribute('id'):'') .($node->getAttribute('class') - ? '.'.join('.', split(' ', $node->getAttribute('class'))):'') + ? '.'.implode('.', explode(' ', $node->getAttribute('class'))):'') ); } print "
";