diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index eff8bb61f29..d8445fdc70c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -263,13 +263,7 @@ class AutoLoader * @return bool false unless className now exists */ private function loadLastResort($className, $loader = null) { - // @CHANGE LDR Add protection to avoid conflict with other autoloader - /*print 'Try to load '.$className."\n"; - if (in_array($className, array('Google_Client'))) - { - return false; - }*/ - $loaders = array_unique(static::$rogueLoaders); + $loaders = array_unique(static::$rogueLoaders); if (isset($loader)) { if (false === array_search($loader, $loaders)) static::$rogueLoaders[] = $loader; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index e8248a385fa..2815f1f6c70 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -159,7 +159,7 @@ class CommentParser $addNewline = true; } continue; - } elseif ($line{0} == '@') { + } elseif ($line[0] == '@') { $mode = 2; $newParam = true; } @@ -353,7 +353,7 @@ class CommentParser $data = $format->decode($str); } } else { // auto detect - if ($str{0} == '{') { + if ($str[0] == '{') { $d = json_decode($str, true); if (json_last_error() != JSON_ERROR_NONE) { throw new Exception('Error parsing embedded JSON data' @@ -445,7 +445,7 @@ class CommentParser { $r = array(); $email = end($value); - if ($email{0} == '<') { + if ($email[0] == '<') { $email = substr($email, 1, -1); array_pop($value); $r['email'] = $email; @@ -470,7 +470,7 @@ class CommentParser $data = array_shift($value); if (empty($data)) { $r['type'] = 'mixed'; - } elseif ($data{0} == '$') { + } elseif ($data[0] == '$') { $r['name'] = substr($data, 1); $r['type'] = 'mixed'; } else { @@ -478,7 +478,7 @@ class CommentParser $r['type'] = count($data) == 1 ? $data[0] : $data; $data = array_shift($value); - if (!empty($data) && $data{0} == '$') { + if (!empty($data) && $data[0] == '$') { $r['name'] = substr($data, 1); } } @@ -498,7 +498,7 @@ class CommentParser $data = array_shift($value); if (empty($data)) { $r['type'] = 'mixed'; - } elseif ($data{0} == '$') { + } elseif ($data[0] == '$') { $r['name'] = substr($data, 1); $r['type'] = 'mixed'; } else { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php index b51fa707a53..ceec32e4cb5 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php @@ -221,7 +221,7 @@ class XmlFormat extends Format $namespaces = $xml->getNamespaces(); if (count($namespaces)) { $p = strpos($data, $xml->getName()); - if ($p && $data{$p - 1} == ':') { + if ($p && $data[$p - 1] == ':') { $s = strpos($data, '<') + 1; $prefix = substr($data, $s, $p - $s - 1); static::$namespacedProperties[static::$rootName] = $prefix; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php index 43e95fa02be..2986968a990 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php @@ -198,7 +198,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi } elseif (false !== ($pos = strpos($id, '-v'))) { //$version = intval(substr($id, $pos + 2)); $id = substr($id, 0, $pos); - } elseif ($id{0} == 'v' && is_numeric($v = substr($id, 1))) { + } elseif ($id[0] == 'v' && is_numeric($v = substr($id, 1))) { $id = ''; //$version = $v; } elseif ($id == 'root' || $id == 'index') { @@ -233,7 +233,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi if ($tSlash) { if ($fLen != $tLen && !Text::beginsWith($fullPath, $target . '/')) continue; - } elseif ($fLen > $tLen + 1 && $fullPath{$tLen + 1} != '{' && !Text::beginsWith($fullPath, '{')) { + } elseif ($fLen > $tLen + 1 && $fullPath[$tLen + 1] != '{' && !Text::beginsWith($fullPath, '{')) { //when mapped to root exclude paths that have static parts //they are listed else where under that static part name continue; @@ -275,7 +275,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi if (count($parts) == 1 && $httpMethod == 'GET') { } else { for ($i = 0; $i < count($parts); $i++) { - if (strlen($parts[$i]) && $parts[$i]{0} == '{') { + if (strlen($parts[$i]) && $parts[$i][0] == '{') { $pos = $i - 1; break; } diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php index c2e9b1acb73..fcb5388726c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php @@ -533,7 +533,7 @@ class Restler extends EventDispatcher rtrim($path, '/') //remove trailing slash if found ); - if (Defaults::$useUrlBasedVersioning && strlen($path) && $path{0} == 'v') { + if (Defaults::$useUrlBasedVersioning && strlen($path) && $path[0] == 'v') { $version = intval(substr($path, 1)); if ($version && $version <= $this->apiVersion) { $this->requestedApiVersion = $version; @@ -1599,7 +1599,7 @@ class Restler extends EventDispatcher */ public function __get($name) { - if ($name{0} == '_') { + if ($name[0] == '_') { $hiddenProperty = substr($name, 1); if (isset($this->$hiddenProperty)) { return $this->$hiddenProperty; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php index 73e78dc0039..999094dec4c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php @@ -87,7 +87,7 @@ class Routes foreach ($methods as $method) { $methodUrl = strtolower($method->getName()); //method name should not begin with _ - if ($methodUrl{0} == '_') { + if ($methodUrl[0] == '_') { continue; } $doc = $method->getDocComment(); @@ -330,7 +330,7 @@ class Routes if (!$type) { return 's'; } - switch ($type{0}) { + switch ($type[0]) { case 'i': case 'f': return 'n'; @@ -428,7 +428,7 @@ class Routes } $index = intval(substr($k, 1)); $details = $value[$httpMethod]['metadata']['param'][$index]; - if ($k{0} == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) { + if ($k[0] == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) { //remove the newlines $data[$details['name']] = trim($v, PHP_EOL); } else { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php index 251262017c3..16ccdd33561 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php @@ -203,7 +203,7 @@ class Scope $divider = '\\'; $qualified = false; - if ($className{0} == $divider) { + if ($className[0] == $divider) { $qualified = trim($className, $divider); } elseif (array_key_exists($className, $scope)) { $qualified = $scope[$className]; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php index abd4a3a73ba..435804b4469 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php @@ -356,7 +356,7 @@ class Emmet $pos = strpos($string, $f, $start); $tokens = array(); for ($i = $start; $i < $pos; $i++) { - $token = $string{$i}; + $token = $string[$i]; if (('#' == $token || '.' == $token) && (!empty($tokens) || $i == 0) ) { @@ -368,7 +368,7 @@ class Emmet $r[] = $f; } while (false != ($f = strtok(static::DELIMITERS))); for ($i = $pos; $i < strlen($string); $i++) { - $token = $string{$i}; + $token = $string[$i]; $r[] = $tokens[] = $token; } return $r;