Can anyone confirm that 2.4.7's /dev/build fails with PHP 5.4. I get a notice "Array to string conversion" and backtrace tells me it's in Line 327 of Database.php: SS_Database->requireIndex(ErrorPage_versions,RecordID_Version,Array)
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
I read that php 5.4 no longer silently accepts array to string conversion, the idea being that it should warn against useless casting (or something of that nature)
I guess silverstripe will work when php warnings are disabled, but this should maybe be patched/looked into if version 2 is to be continued alongside 3? There might be other places where this might happen as well?
Hi smares
I confirm. PHP 5.4.3
My error is in Line 162 of SSViewer.php
162 if(substr((string) $templateList,-3) == '.ss') {
163 $this->chosenTemplates['main'] = $templateList;
164 } else {
165 if(!is_array($templateList)) $templateList = array($templateList);
166
167 if(isset($_GET['debug_request'])) Debug::message("Selecting templates from the following list: " . implode(", ", $templateList));
Do you find a clue?
Simply change
if(substr((string) $templateList,-3) == '.ss') {
to
if(is_string($templateList) && substr((string) $templateList,-3) == '.ss') {
Though not sure if 2.4 'officially' supports PHP5.4
This may be of some help:
https://github.com/silverstripe/sapphire/commit/4ff8cff262077e2ff1f32172cc471f829110834c
Thanks,
Sean
Should I be having the same issue with 3.0.2 and PHP 5.3? Just get a blank white page (rest of site shows up fine)
Not sure if it's related but the installation gives the false mod_rewrite and AllowOverride All issues with Friendly URLs.
http://open.silverstripe.org/ticket/7498
Thanks
we have the same problem occurring again n again.
I upgraded from 3.0.2 to the daily build and that fixed the dev/build issues.