mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Type check fixes
This commit is contained in:
parent
f992da84ae
commit
793d832e92
1 changed files with 4 additions and 2 deletions
|
@ -44,13 +44,15 @@ class Museum extends PropertiesBase{
|
||||||
&&
|
&&
|
||||||
isset($parsedUrl['fragment'])
|
isset($parsedUrl['fragment'])
|
||||||
){
|
){
|
||||||
$id = preg_replace('/,.+$/ius', '', $parsedUrl['fragment']);
|
$id = (string)$parsedUrl['fragment'];
|
||||||
|
$id = preg_replace('/,.+$/ius', '', $id);
|
||||||
$id = preg_replace('|^/|ius', '', $id);
|
$id = preg_replace('|^/|ius', '', $id);
|
||||||
$outputUrl = 'https://' . $parsedUrl['host'] . '/en/collection/' . $id;
|
$outputUrl = 'https://' . $parsedUrl['host'] . '/en/collection/' . $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match('|^en/rijksstudio/[^/]+/[^/]+/objects$|ius', $parsedUrl['path']) && isset($parsedUrl['fragment'])){
|
if(preg_match('|^en/rijksstudio/[^/]+/[^/]+/objects$|ius', $parsedUrl['path']) && isset($parsedUrl['fragment'])){
|
||||||
$id = preg_replace('/,.+$/ius', '', $parsedUrl['fragment']);
|
$id = (string)$parsedUrl['fragment'];
|
||||||
|
$id = preg_replace('/,.+$/ius', '', $id);
|
||||||
$id = preg_replace('|^/|ius', '', $id);
|
$id = preg_replace('|^/|ius', '', $id);
|
||||||
$outputUrl = 'https://' . $parsedUrl['host'] . '/en/collection/' . $id;
|
$outputUrl = 'https://' . $parsedUrl['host'] . '/en/collection/' . $id;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue