mirror of
				https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
				synced 2025-10-31 03:50:20 -04:00 
			
		
		
		
	fix 'Array and string offset access using curly braces' deprecated error
This commit is contained in:
		
							parent
							
								
									b2baa5051b
								
							
						
					
					
						commit
						5374602896
					
				| @ -12,7 +12,7 @@ function ordUTF8($c, $index = 0, &$bytes = null) | ||||
|     $bytes = 0; | ||||
|     if ($index >= $len) | ||||
|     return false; | ||||
|     $h = ord($c{$index}); | ||||
|     $h = ord($c[$index]); | ||||
|     if ($h <= 0x7F) { | ||||
|     $bytes = 1; | ||||
|     return $h; | ||||
| @ -21,18 +21,18 @@ function ordUTF8($c, $index = 0, &$bytes = null) | ||||
|     return false; | ||||
|     else if ($h <= 0xDF && $index < $len - 1) { | ||||
|     $bytes = 2; | ||||
|     return ($h & 0x1F) << 6 | (ord($c{$index + 1}) & 0x3F); | ||||
|     return ($h & 0x1F) << 6 | (ord($c[$index + 1]) & 0x3F); | ||||
|     } | ||||
|     else if ($h <= 0xEF && $index < $len - 2) { | ||||
|     $bytes = 3; | ||||
|     return ($h & 0x0F) << 12 | (ord($c{$index + 1}) & 0x3F) << 6 | ||||
|     | (ord($c{$index + 2}) & 0x3F); | ||||
|     return ($h & 0x0F) << 12 | (ord($c[$index + 1]) & 0x3F) << 6 | ||||
|     | (ord($c[$index + 2]) & 0x3F); | ||||
|     } | ||||
|     else if ($h <= 0xF4 && $index < $len - 3) { | ||||
|     $bytes = 4; | ||||
|     return ($h & 0x0F) << 18 | (ord($c{$index + 1}) & 0x3F) << 12 | ||||
|     | (ord($c{$index + 2}) & 0x3F) << 6 | ||||
|     | (ord($c{$index + 3}) & 0x3F); | ||||
|     return ($h & 0x0F) << 18 | (ord($c[$index + 1]) & 0x3F) << 12 | ||||
|     | (ord($c[$index + 2]) & 0x3F) << 6 | ||||
|     | (ord($c[$index + 3]) & 0x3F); | ||||
|     } | ||||
|     else | ||||
|     return false; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user