@@ -713,7 +713,7 @@ function is_valid_value($value) {
713
713
}
714
714
715
715
// Value must be positive
716
- return ($ value{ 0 } != '- ' );
716
+ return ($ value[ 0 ] != '- ' );
717
717
}
718
718
}
719
719
@@ -736,11 +736,11 @@ function is_valid_value($value) {
736
736
}
737
737
738
738
$ pos = strpos ($ value , '/ ' ); // We know there's only one / in there
739
- if ($ value{ $ pos - 1 } != 'Z ' ) {
739
+ if ($ value[ $ pos - 1 ] != 'Z ' ) {
740
740
// Start time MUST be in UTC
741
741
return false ;
742
742
}
743
- if ($ value{ $ pos + 1 } != 'P ' && $ substr ($ value , -1 ) != 'Z ' ) {
743
+ if ($ value[ $ pos + 1 ] != 'P ' && $ substr ($ value , -1 ) != 'Z ' ) {
744
744
// If the second part is not a period, it MUST be in UTC
745
745
return false ;
746
746
}
@@ -1170,13 +1170,13 @@ function is_valid_value($value) {
1170
1170
$ escch = false ;
1171
1171
1172
1172
for ($ i = 0 ; $ i < $ len ; ++$ i ) {
1173
- if ($ value{ $ i } == '; ' && !$ escch) {
1173
+ if ($ value[ $ i ] == '; ' && !$ escch ) {
1174
1174
// Token completed
1175
1175
$ parts [] = substr ($ value , $ from , $ i - $ from );
1176
1176
$ from = $ i + 1 ;
1177
1177
continue ;
1178
1178
}
1179
- $ escch = ($ value{ $ i } == '\\' );
1179
+ $ escch = ($ value[ $ i ] == '\\' );
1180
1180
}
1181
1181
// Add one last token with the remaining text; if the value
1182
1182
// ended with a ';' it was illegal, so check that this token
@@ -1197,23 +1197,23 @@ function is_valid_value($value) {
1197
1197
return false ;
1198
1198
}
1199
1199
1200
- if ($ parts [0 ]{ 0 } < '1 ' || $ parts [0 ]{ 0 } > '4 ' ) {
1200
+ if ($ parts [0 ][ 0 ] < '1 ' || $ parts [0 ][ 0 ] > '4 ' ) {
1201
1201
return false ;
1202
1202
}
1203
1203
1204
1204
$ len = strlen ($ parts [0 ]);
1205
1205
1206
1206
// Max 3 levels, and can't end with a period
1207
- if ($ len > 5 || $ parts [0 ]{ $ len - 1 } == '. ' ) {
1207
+ if ($ len > 5 || $ parts [0 ][ $ len - 1 ] == '. ' ) {
1208
1208
return false ;
1209
1209
}
1210
1210
1211
1211
for ($ i = 1 ; $ i < $ len ; ++$ i ) {
1212
- if (($ i & 1 ) == 1 && $ parts [0 ]{ $ i } != '. ' ) {
1212
+ if (($ i & 1 ) == 1 && $ parts [0 ][ $ i ] != '. ' ) {
1213
1213
// Even-indexed chars must be periods
1214
1214
return false ;
1215
1215
}
1216
- else if (($ i & 1 ) == 0 && ($ parts [0 ]{ $ i } < '0 ' || $ parts [0 ]{ $ i } > '9 ' )) {
1216
+ else if (($ i & 1 ) == 0 && ($ parts [0 ][ $ i ] < '0 ' || $ parts [0 ][ $ i ] > '9 ' )) {
1217
1217
// Odd-indexed chars must be numbers
1218
1218
return false ;
1219
1219
}
@@ -1237,8 +1237,8 @@ function is_valid_value($value) {
1237
1237
$ parts [$ i ] .= '# ' ; // This guard token saves some conditionals in the loop
1238
1238
1239
1239
for ($ j = 0 ; $ j < $ len ; ++$ j ) {
1240
- $ thischar = $ parts [$ i ]{ $ j } ;
1241
- $ nextchar = $ parts [$ i ]{ $ j + 1 } ;
1240
+ $ thischar = $ parts [$ i ][ $ j ] ;
1241
+ $ nextchar = $ parts [$ i ][ $ j + 1 ] ;
1242
1242
if ($ thischar == '\\' ) {
1243
1243
// Next char must now be one of ";,\nN"
1244
1244
if ($ nextchar != '; ' && $ nextchar != ', ' && $ nextchar != '\\' &&
0 commit comments