Witaj
Poradnik jest ok.. Ale.. mam nadal jeden problem a dotyczy on już zmienionego przez ciebie kodu.
Dotyczy on pliku maps.php
mam taki błąd
Warning: function_exists() expects parameter 1 to be string, array given in /zalosnieu/psychostats/includes/class_table.php on line 162
w tym miejscu mam taką linijkę.
162 if (function_exists($callback) or is_array($callback)) {
Gdy wpisze w miejsce $callback - 1 faktycznie znika bład.. ale psychostaty już niedziałaja wlaściwie.
Możesz podać modyfikację do poniższego zapytania ?
function callback($html, $callback, $params = array()) {
$ret = false;
if (function_exists($callback) or is_array($callback)) {
$ret = call_user_func_array($callback, $params ? array($html, $params) : array($html)); // zmieniłem jak podałeś w wcześniejszym poście
}
elseif (strpos($callback, '%') !== false) {
$ret = sprintf($callback, $html);
}
if ($ret !== false) $html = $ret;
/*
list($obj, $func) = is_array($callback) ? $callback : array(null, $callback);
if ($obj and is_object($obj) and method_exists($obj, $func)) {
$html = $obj->$func($html);
} elseif (function_exists($func)) {
$html = $func($html);
}
*/
return $html;
}
Dziękuje z góry za pomoc.
Pozdrawiam