HOla comunidad, tengo el siguiente código:
Código:
$this->page = preg_replace_callback('/{page_link_(.*?)}/is', create_function('$matches', 'global $config;
require_once($config[\'basepath\'].\'/include/page_display.inc.php\');
$title = page_display::get_page_title($matches[1]);
$title = strtolower(str_replace(" ", $config[\'seo_url_seperator\'], $title));
return $config[\'baseurl\'].\'/page-\'.urlencode($title).\'-\'.$matches[1].\'.html\';'), $this->page);
el cual me devuelve el siguiente error:
Cita: Strict Standards: Non-static method page_display::get_page_title() should not be called statically in
Estado revisando y veo que hay una incompatibilidad de la función "preg_replace_callback" a partir de php5.3+ y que "create_function" hay que reemplazarlo por "function"
Intente así y no me funciona:
Código:
$this->page = preg_replace_callback('/{page_link_(.*?)}/is',
function($matches) {global $config;
require_once($config[\'basepath\'].\'/include/page_display.inc.php\');
$title = page_display::get_page_title($matches[1]);
$title = strtolower(str_replace(" ", $config[\'seo_url_seperator\'], $title));
return $config[\'baseurl\'].\'/page-\'.urlencode($title).\'-\'.$matches[1].\'.html\';'}, $this->page);
Alguien puede orientarme en la sintaxis para que funcione en php5.3