diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index 6a373137f..935fbae62 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -233,10 +233,10 @@ class Person extends API_Controller //Quersumme bilden for ($i = 0; $i < 10; $i++) { - $erg += $gewichtung[$i] * $tmpSvnr{$i}; + $erg += $gewichtung[$i] * $tmpSvnr[$i]; } - if ($tmpSvnr{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 + if ($tmpSvnr[3] != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 { return error('SVNR ist ungueltig'); } @@ -244,7 +244,7 @@ class Person extends API_Controller if (mb_strlen($person['svnr']) == 12) { $last = substr($person['svnr'], 10, 12); - if ($last{0} != 'v' || !is_numeric($last{1})) + if ($last[0] != 'v' || !is_numeric($last[1])) { return error('SVNR ist ungueltig'); } diff --git a/include/File/CSV.php b/include/File/CSV.php index c4c4d44ad..ea67181f1 100644 --- a/include/File/CSV.php +++ b/include/File/CSV.php @@ -178,7 +178,7 @@ class File_CSV return $field; } - if ($quote && $field{0} == $quote && $field{strlen($field)-1} == $quote) { + if ($quote && $field[0] == $quote && $field[strlen($field) - 1] == $quote) { return substr($field, 1, -1); } return $field; @@ -230,7 +230,7 @@ class File_CSV } elseif ($c == "\n" || $c == "\r") { $sub = ($prev == "\r") ? 2 : 1; if ((strlen($buff) >= $sub) && - ($buff{strlen($buff) - $sub} == $quote)) + ($buff[strlen($buff) - $sub] == $quote)) { $in_quote = false; } @@ -312,9 +312,9 @@ class File_CSV $last =& $fields[count($fields) - 1]; // Fallback to read the line with readQuoted when guess // that the simple explode won't work right - if (($last{strlen($last) - 1} == "\n" - && $last{0} == $conf['quote'] - && $last{strlen(rtrim($last)) - 1} != $conf['quote']) + if (($last[strlen($last) - 1] == "\n" + && $last[0] == $conf['quote'] + && $last[strlen(rtrim($last)) - 1] != $conf['quote']) || (count($fields) != $conf['fields']) // XXX perhaps there is a separator inside a quoted field @@ -511,4 +511,4 @@ class File_CSV return true; } } -?> \ No newline at end of file +?> diff --git a/include/File/Util.php b/include/File/Util.php index 941c61441..5474bc2a7 100644 --- a/include/File/Util.php +++ b/include/File/Util.php @@ -96,7 +96,7 @@ class File_Util { if (File_Util::isAbsolute($path)) { if (FILE_WIN32) { - return substr($path, $path{3} == '\\' ? 4 : 3); + return substr($path, $path[3] == '\\' ? 4 : 3); } return ltrim($path, '/'); } @@ -182,7 +182,7 @@ class File_Util if (FILE_WIN32) { return preg_match('/^[a-zA-Z]:(\\\|\/)/', $path); } - return ($path{0} == '/') || ($path{0} == '~'); + return ($path[0] == '/') || ($path[0] == '~'); } /** @@ -244,11 +244,11 @@ class File_Util } else { $cwd = getcwd(); $drive = substr($cwd, 0, 2); - if ($path{0} !== $separator{0}) { + if ($path[0] !== $separator[0]) { $path = substr($cwd, 3) . $separator . $path; } } - } elseif ($path{0} !== $separator) { + } elseif ($path[0] !== $separator) { $path = getcwd() . $separator . $path; } @@ -323,7 +323,7 @@ class File_Util $entries = array(); for ($dir = dir($path); false !== $entry = $dir->read(); ) { - if ($list & FILE_LIST_DOTS || $entry{0} !== '.') { + if ($list & FILE_LIST_DOTS || $entry[0] !== '.') { $isRef = ($entry === '.' || $entry === '..'); $isDir = $isRef || is_dir($path .'/'. $entry); if ( ((!$isDir && $list & FILE_LIST_FILES) || diff --git a/include/filter.class.php b/include/filter.class.php index c3d1d6ac1..7100e6562 100644 --- a/include/filter.class.php +++ b/include/filter.class.php @@ -240,7 +240,7 @@ class filter extends basis_db { //$value->value = preg_replace('/(.*?)selected=.selected./', '$1', $value->value); //$value->value = preg_replace('/(.*?)\s*[selected=?selected?]/', '$1', $value->value); - //$value->value = preg_replace('/(.*?)\s*selected="selected"\s*/', '${1}', $value->value); + //$value->value = preg_replace('/(.*?)\s*selected="selected"\s*/', '$[1]', $value->value); //$value->value = preg_replace('/^\s*selected=.*?selected.*?\s*/', ' ', $value->value); //$value->value = str_replace('selected=', '', $value->value); diff --git a/include/securimage/WavFile.php b/include/securimage/WavFile.php index 6d84fc725..d56dbd942 100644 --- a/include/securimage/WavFile.php +++ b/include/securimage/WavFile.php @@ -1532,7 +1532,7 @@ class WavFile } else { // replace for ($i = 0; $i < $sampleBytes; ++$i) { - $this->_samples{$offset + $i} = $sampleBinary{$i}; + $this->_samples[$offset + $i] = $sampleBinary[$i]; } } diff --git a/include/securimage/securimage.php b/include/securimage/securimage.php index 51d876672..820e8b92f 100644 --- a/include/securimage/securimage.php +++ b/include/securimage/securimage.php @@ -1435,7 +1435,7 @@ class Securimage $length = strlen($code['display']); for($i = 0; $i < $length; ++$i) { - $letter = $code['display']{$i}; + $letter = $code['display'][$i]; $letters[] = $letter; } }