K (4 Versionen importiert) |
Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
{{Missing|all}} | {{Missing|all}} | ||
[[File:Hovercard - anonymous preferences.png|800px|thumb|center]] | [[File:Hovercard - anonymous preferences.png|800px|thumb|center]] | ||
=== Fehlermeldung "Undefined array key 1 in LuaStandaloneInterpreter.php line 338" === | |||
Ein kleiner Extension Hack ist notwendig, die nachfolgende Funktion muss ersetzt werden (ca. Zeile 338)<syntaxhighlight lang="php"> | |||
/** | |||
* Get interpreter status | |||
* @return array | |||
*/ | |||
public function getStatus() { | |||
$result = $this->dispatch( [ | |||
'op' => 'getStatus', | |||
] ); | |||
return $result[1]; | |||
} | |||
</syntaxhighlight>mit<syntaxhighlight lang="php"> | |||
/** | |||
* Get interpreter status | |||
* @return array|null | |||
*/ | |||
public function getStatus() { | |||
$result = $this->dispatch( [ | |||
'op' => 'getStatus', | |||
] ); | |||
// Check if $result[1] exists to prevent the undefined array key warning | |||
return isset($result[1]) ? $result[1] : null; | |||
} | |||
</syntaxhighlight> | |||
[[Category:Self-hosted]] | [[Category:Self-hosted]] |
Version vom 12. November 2024, 00:01 Uhr
This article is missing information about all. |
Fehlermeldung "Undefined array key 1 in LuaStandaloneInterpreter.php line 338"
Ein kleiner Extension Hack ist notwendig, die nachfolgende Funktion muss ersetzt werden (ca. Zeile 338)
/**
* Get interpreter status
* @return array
*/
public function getStatus() {
$result = $this->dispatch( [
'op' => 'getStatus',
] );
return $result[1];
}
mit
/**
* Get interpreter status
* @return array|null
*/
public function getStatus() {
$result = $this->dispatch( [
'op' => 'getStatus',
] );
// Check if $result[1] exists to prevent the undefined array key warning
return isset($result[1]) ? $result[1] : null;
}