Skip to content

Commit 3139c18

Browse files
author
Kousuke Ebihara
committed
changed the opAPI::getMemberIdByUrl() method for slipshod checking uri format
1 parent d30a8e7 commit 3139c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/api/opAPI.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ public function getMemberIdByUrl($url)
289289
$path = parse_url($url, PHP_URL_PATH);
290290
if ($path)
291291
{
292-
$pieces = explode('/', $path);
293-
if (isset($pieces[1]) && 'member' === $pieces[1])
292+
if (false !== strpos($path, 'member'))
294293
{
294+
$pieces = explode('/', $path);
295295
$result = (int)array_pop($pieces);
296296
}
297297
}

0 commit comments

Comments
 (0)