PHP Deprecated: The each() function is deprecated

4 years 6 months ago #314690 by churruka
buenas
estoy usando su complemento
pero el servidor me manda un mensaje de error

PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in public_html/administrator/components/com_uddeim/admin.shared.php on line 705


la linea en concreto es
while (list($key, $row) = each($value)) {



good
I am using its complement
but the server sends me an error message

PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in public_html/administrator/components/com_uddeim/admin.shared.php on line 705

the specific line is
while (list($key, $row) = each($value)) {

Please Log in to join the conversation.

4 years 5 months ago - 4 years 5 months ago #315250 by theITfactor
Replied by theITfactor on topic PHP Deprecated: The each() function is deprecated
In /administrator/components/com_uddeim/admin.shared.php

Find (~line 705):
while (list($key, $row) = each($value)) {

Replace With:
foreach($value as $key => $row) {

In /components/com_uddeim/bbparser.php

Find (~line 207):
while (list($emo_txt,$emo_src)=each($message_emoticons)) {

Replace with:
foreach($message_emoticons as $emo_txt => $emo_src) {
The following user(s) said Thank You: Krki

Please Log in to join the conversation.

4 years 4 months ago #315413 by churruka
muchas gracias , ya esta corregido


thank you very much, it's already corrected

Please Log in to join the conversation.

4 years 1 month ago - 4 years 1 month ago #317132 by latorreinfo
Replied by latorreinfo on topic PHP Deprecated: The each() function is deprecated
The each function also occurs (6 times) in public_html/administrator/components/com_uddeim/attachment.php and generates a deprectated warning in PHP.

These are changes I think are needed. I have tested uddeim and can send and receive attachments.

Replace line 43

while (list($key, $value) = each( $tmp_files["tmp_name"] )) {

With

foreach($tmp_files["tmp_name"] as $key => $value) {

Replace line 118

while (list($key, $value) = each( $uploadfile_temppathname )) {

With

foreach($uploadfile_temppathname as $key => $value) {

Replace line 138

while (list($key, $value) = each( $uploadfile_temppathname )) {

With

foreach($uploadfile_temppathname as $key => $value) {

Replace line 165

while (list($key, $row) = each($uploadfile_temppathname)) {

With

foreach($uploadfile_temppathname as $key => $row) {

Replace line 190

while (list($key, $row) = each($value)) {

with

foreach($value as $key => $row) {

Replace line 233

while (list($key, $row) = each($value)) {

with

foreach($value as $key => $row) {

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.250 seconds

Facebook Twitter LinkedIn