Skip to content

Commit 82f3259

Browse files
committed
Merge pull request #27 from nickfan/master
function_exists check
2 parents 192f93e + 161250d commit 82f3259

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/JmesPath.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
* Returns data from the input array that matches a JMESPath expression.
66
*
77
* @param string $expression Expression to search.
8-
* @param mixed $data Data to search.
8+
* @param mixed $data Data to search.
99
*
1010
* @return mixed|null
1111
*/
12-
function search($expression, $data)
13-
{
14-
return Env::search($expression, $data);
12+
if (!function_exists(__NAMESPACE__ . '\search')) {
13+
function search($expression, $data)
14+
{
15+
return Env::search($expression, $data);
16+
}
1517
}

0 commit comments

Comments
 (0)