fix: use explode
instead of split
This commit is contained in:
parent
9a571832f5
commit
da760ee4a3
2 changed files with 4 additions and 4 deletions
includes/core
|
@ -42,7 +42,7 @@ final class URLMapper
|
|||
if ( ! preg_match( '/^(\/[a-z0-9]+)+$/' , $path ) ) {
|
||||
$this->showPageNotFound( );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->prefix == null ) {
|
||||
$path = substr( $path , 1 );
|
||||
|
@ -66,7 +66,7 @@ final class URLMapper
|
|||
|
||||
private function showPageFor( $path )
|
||||
{
|
||||
$split = split( '/' , $path );
|
||||
$split = explode( '/' , $path );
|
||||
$extras = array( );
|
||||
while ( !empty( $split ) ) {
|
||||
$name = join( '_' , $split );
|
||||
|
@ -148,7 +148,7 @@ class Page_Errors
|
|||
|
||||
public function setExtraPath( $extraPath )
|
||||
{
|
||||
$extraPath = split( '/' , $extraPath );
|
||||
$extraPath = explode( '/' , $extraPath );
|
||||
if ( (int)$extraPath[ 0 ] != 0 ) {
|
||||
$this->httpError = (int) $extraPath[ 0 ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue