kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 132 forks source link

The /e modifier is deprecated #133

Open ikngweb opened 9 years ago

ikngweb commented 9 years ago

I have just downloaded stacey and...

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/html/stacey/app/page-data.inc.php on line 113

PHP 5.5.9

pbatts commented 9 years ago

Stacey has not been abandoned. There is still an active community. See conversation here. https://github.com/kolber/stacey/issues/131#issuecomment-70024728

The /e modifier issue was fixed Jul 19, 2013. Look here. https://github.com/kolber/stacey/commit/52804679bf7a9a1d1227737ba0340e84a7c7e5e0

You have an old version. Your installation should include this version of page-data.inc.php https://github.com/kolber/stacey/blob/master/app/page-data.inc.php

You can download the latest version here. https://github.com/kolber/stacey/archive/master.zip

desbest commented 4 years ago

That fix is for Stacey 3. If you use Stacey 2.3, the fix is

$page->page_name = ucfirst(preg_replace_callback('/[-_](.)/', function ($matches) { return "' '.strtoupper('\\1')"; }, $page->data['@slug']));

(addition of @)