Fixes usage of deprecated array/string access syntax. (#97)

PHP 7.4 Compatibility.
This commit is contained in:
Bennet Bleßmann 2020-08-30 13:56:25 +02:00 committed by GitHub
parent 0b65747110
commit 34d4f20222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ class TemplateRender extends PageRender {
$next_number = $vals; $next_number = $vals;
foreach ($mod as $calc) { foreach ($mod as $calc) {
$operand = $calc{0}; $operand = $calc[0];
$operator = substr ($calc,1); $operator = substr ($calc,1);
switch ($operand) { switch ($operand) {

View File

@ -223,7 +223,7 @@ abstract class Export {
*/ */
protected function isSafeAscii($str) { protected function isSafeAscii($str) {
for ($i=0;$i<strlen($str);$i++) for ($i=0;$i<strlen($str);$i++)
if (ord($str{$i}) < 32 || ord($str{$i}) > 127) if (ord($str[$i]) < 32 || ord($str[$i]) > 127)
return false; return false;
return true; return true;

View File

@ -1638,7 +1638,7 @@ function get_icon($server_id,$dn,$object_classes=array()) {
# Return icon filename based upon objectClass value # Return icon filename based upon objectClass value
if (in_array('sambaaccount',$object_classes) && if (in_array('sambaaccount',$object_classes) &&
'$' == $rdn{ strlen($rdn) - 1 }) '$' == $rdn[ strlen($rdn) - 1 ])
return 'nt_machine.png'; return 'nt_machine.png';
if (in_array('sambaaccount',$object_classes)) if (in_array('sambaaccount',$object_classes))