fix: use explode
instead of split
This commit is contained in:
parent
9a571832f5
commit
da760ee4a3
2 changed files with 4 additions and 4 deletions
|
@ -66,7 +66,7 @@ final class URLMapper
|
||||||
|
|
||||||
private function showPageFor( $path )
|
private function showPageFor( $path )
|
||||||
{
|
{
|
||||||
$split = split( '/' , $path );
|
$split = explode( '/' , $path );
|
||||||
$extras = array( );
|
$extras = array( );
|
||||||
while ( !empty( $split ) ) {
|
while ( !empty( $split ) ) {
|
||||||
$name = join( '_' , $split );
|
$name = join( '_' , $split );
|
||||||
|
@ -148,7 +148,7 @@ class Page_Errors
|
||||||
|
|
||||||
public function setExtraPath( $extraPath )
|
public function setExtraPath( $extraPath )
|
||||||
{
|
{
|
||||||
$extraPath = split( '/' , $extraPath );
|
$extraPath = explode( '/' , $extraPath );
|
||||||
if ( (int)$extraPath[ 0 ] != 0 ) {
|
if ( (int)$extraPath[ 0 ] != 0 ) {
|
||||||
$this->httpError = (int) $extraPath[ 0 ];
|
$this->httpError = (int) $extraPath[ 0 ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ class Validator_Email
|
||||||
public function validate( $value )
|
public function validate( $value )
|
||||||
{
|
{
|
||||||
if ( preg_match( "/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/" , $value ) ) {
|
if ( preg_match( "/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/" , $value ) ) {
|
||||||
list( $username , $domain ) = split( '@' , $value );
|
list( $username , $domain ) = explode( '@' , $value );
|
||||||
if ( checkdnsrr( $domain , 'MX' ) ) {
|
if ( checkdnsrr( $domain , 'MX' ) ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue