fix: don't use {}
for string access
This commit is contained in:
parent
fbd561638f
commit
9a571832f5
4 changed files with 6 additions and 6 deletions
|
@ -35,8 +35,8 @@ class BoxButton
|
||||||
public function render( $baseURL )
|
public function render( $baseURL )
|
||||||
{
|
{
|
||||||
$url = $this->URL;
|
$url = $this->URL;
|
||||||
if ( $url{0} != ':' ) {
|
if ( $url[0] != ':' ) {
|
||||||
if ( $url{0} != '/' ) {
|
if ( $url[0] != '/' ) {
|
||||||
$url = "/$url";
|
$url = "/$url";
|
||||||
}
|
}
|
||||||
$url = $baseURL . $url;
|
$url = $baseURL . $url;
|
||||||
|
|
|
@ -52,7 +52,7 @@ abstract class Page
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ( ! is_null( $rc ) ) {
|
} elseif ( ! is_null( $rc ) ) {
|
||||||
if ( $rc{0} != '/' ) {
|
if ( $rc[0] != '/' ) {
|
||||||
$rc = $this->baseURL . '/' . $rc;
|
$rc = $this->baseURL . '/' . $rc;
|
||||||
}
|
}
|
||||||
$rc = ( ( array_key_exists( 'HTTPS' , $_SERVER ) && $_SERVER[ 'HTTPS' ] ) ? 'https' : 'http' ) . '://' . $_SERVER[ 'SERVER_NAME' ]
|
$rc = ( ( array_key_exists( 'HTTPS' , $_SERVER ) && $_SERVER[ 'HTTPS' ] ) ? 'https' : 'http' ) . '://' . $_SERVER[ 'SERVER_NAME' ]
|
||||||
|
|
|
@ -76,7 +76,7 @@ class Ctrl_Form
|
||||||
$url = $this->form->cancelURL( );
|
$url = $this->form->cancelURL( );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $url{0} != '/' ) {
|
if ( $url[0] != '/' ) {
|
||||||
$url = "/$url";
|
$url = "/$url";
|
||||||
}
|
}
|
||||||
return $page->getBaseURL( ) . $url;
|
return $page->getBaseURL( ) . $url;
|
||||||
|
|
|
@ -105,8 +105,8 @@ class View_Form
|
||||||
$prefix = $name . '-';
|
$prefix = $name . '-';
|
||||||
|
|
||||||
$action = $this->form->action( );
|
$action = $this->form->action( );
|
||||||
if ( $action{0} != '?' ) {
|
if ( $action[0] != '?' ) {
|
||||||
if ( $action{0} != '/' ) {
|
if ( $action[0] != '/' ) {
|
||||||
$action = "/$action";
|
$action = "/$action";
|
||||||
}
|
}
|
||||||
$action = $this->base . $action;
|
$action = $this->base . $action;
|
||||||
|
|
Loading…
Add table
Reference in a new issue