error_log users/settings.php

Тема закрыта
610
.
[30-Apr-2017 14:05:17 UTC] PHP Strict Standards: Only variables should be passed by reference in /home/xxxxxx/public_html/users/includes/profile/settings.php on line 140

Line 140
$theme_list[] = array_pop(explode('/', dirname($val)));


// Устанавливаем скин
            foreach (glob('../theme/*/*.css') as $val)
                $theme_list[] = array_pop(explode('/', dirname($val)));
            $set_user['skin'] = isset($_POST['skin']) && in_array($_POST['skin'], $theme_list) ? functions::check($_POST['skin']) : $set['skindef'];


Anyone can help, thanks
.
(\/)____o_O____(\/)
$arr = explode(...);
array_pop($arr);
.
The string
$theme_list[] = array_pop(explode('/', dirname($val)));


It is necessary to write down so
$array = explode('/', dirname($val));

$theme_list[] = array_pop($array);
.
# ДоХтор (30.04.2017 / 17:38)
The string $theme_list[] = array_pop(explode('/', dirname($val)));

It is necessary to write down so$array = explode('/', dirname($val));

$theme_list[] = array_pop($array);
is not work, when i try to change the theme, they hasn't changed. ?
.
eco_oce, This example is not for changing the topic. It demonstrates the efficiency of the code without errors or notifications.
.
eco_oce
Добавлено: 30.04.2017 / 19:16
Ok, thanks ?

Добавлено: 30.04.2017 / 19:30
I used this
error_reporting(0); // Turn off all error reporting

:v
.
# eco_oce (30.04.2017 / 19:30)
Ok, thanks ?


I used this
error_reporting(0); // Turn off all error reporting
:v
This is not the right approach. It is better to write down the code correctly.
.
I know, but it's a little hard for me
.
eco_oce, what exactly? In the example, everything seems to be clear.
.
// Устанавливаем скин
            foreach (glob('../theme/*/*.css') as $val)
            $array = explode('/', dirname($val));
            $theme_list[] = array_pop($array);
            $set_user['skin'] = isset($_POST['skin']) && in_array($_POST['skin'], $theme_list) ? functions::check($_POST['skin']) : $set['skindef'];
Всего: 17