mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Trying update core to PHP 7.4.21
This commit is contained in:
parent
e74e6c3f77
commit
1a884f6d2a
12 changed files with 80 additions and 79 deletions
|
|
@ -182,7 +182,7 @@ class ConsoleAPI{
|
|||
if(preg_match_all('#@([@a-z]{1,})#', $params, $matches, PREG_OFFSET_CAPTURE) > 0){
|
||||
$offsetshift = 0;
|
||||
foreach($matches[1] as $selector){
|
||||
if($selector[0]{0} === "@"){ //Escape!
|
||||
if($selector[0][0] === "@"){ //Escape!
|
||||
$params = substr_replace($params, $selector[0], $selector[1] + $offsetshift - 1, strlen($selector[0]) + 1);
|
||||
--$offsetshift;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ class PluginAPI extends stdClass{
|
|||
private function loadAll(){
|
||||
$dir = dir($this->pluginsPath());
|
||||
while(false !== ($file = $dir->read())){
|
||||
if($file{0} !== "."){
|
||||
if($file[0] !== "."){
|
||||
$ext = strtolower(substr($file, -3));
|
||||
if($ext === "php" or $ext === "pmf"){
|
||||
$this->load($dir->path . $file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue