remove instances where a pointer is used in a foreach loop for value (#7108)

This commit is contained in:
frytimo
2024-08-22 15:41:10 -03:00
committed by GitHub
parent 0583c5b429
commit 2cbb4dbc31
73 changed files with 170 additions and 170 deletions

View File

@@ -70,7 +70,7 @@ if ($domains_processed == 1) {
$sql .= "from v_phrase_details where phrase_detail_function = 'play-file' ";
$result = $database->select($sql, null, 'all');
if (is_array($result) && @sizeof($result) != 0) {
foreach ($result as $index => &$row) {
foreach ($result as $index => $row) {
$phrase_detail_uuid = $row['phrase_detail_uuid'];
$phrase_detail_data = $row['phrase_detail_data'];
if (substr_count($phrase_detail_data, $setting->get('switch','recordings').'/'.$domain_name) > 0) {
@@ -105,7 +105,7 @@ if ($domains_processed == 1) {
$sql .= "and phrase_detail_data like 'lua(streamfile.lua %)' ";
$result = $database->select($sql, null, 'all');
if (is_array($result) && @sizeof($result) != 0) {
foreach ($result as $index => &$row) {
foreach ($result as $index => $row) {
$phrase_detail_uuid = $row['phrase_detail_uuid'];
$phrase_detail_data = $row['phrase_detail_data'];
//update function and data to use standard method

View File

@@ -349,7 +349,7 @@
if (is_array($recordings) && @sizeof($recordings) != 0) {
echo "var opt_group = document.createElement('optgroup');\n";
echo "opt_group.label = \"".$text['label-recordings']."\";\n";
foreach ($recordings as &$row) {
foreach ($recordings as $row) {
if (!empty($_SESSION['recordings']['storage_type']['text']) && $_SESSION['recordings']['storage_type']['text'] == 'base64') {
echo "opt_group.appendChild(new Option(\"".$row["recording_name"]."\", \"\${lua streamfile.lua ".$row["recording_filename"]."}\"));\n";
}