1777 Posts in 499 Topics by 534 members
Blog Module
SilverStripe Forums » Blog Module » [Notice] Array to string conversion
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 2306 Views |
-
[Notice] Array to string conversion

27 October 2009 at 6:15am Last edited: 27 October 2009 6:16am
Installed the blog module and I got an error that I found a fix for on this forum.
Now I have this new error. How can I fix this?
[Notice] Array to string conversion
GET /fit/blog/?flush=1Line 16 in /Users/gforce/Desktop/Repository/fit/sapphire/core/model/fieldtypes/Date.php
SOURCE
class Date extends DBField {
function setValue($value) {
if( is_array( $value ) && $value['Day'] && $value['Month'] && $value['Year'] ) {
$this->value = $value['Year'] . '-' . $value['Month'] . '-' . $value['Day'];
return;
}
// Default to NZ date format - strtotime expects a US date
if(ereg('^([0-9]+)/([0-9]+)/([0-9]+)$', $value, $parts))
$value = "$parts[2]/$parts[1]/$parts[3]";
if($value && is_string($value)) $this->value = date('Y-m-d', strtotime($value));
else $value = null;
} -
Re: [Notice] Array to string conversion

20 January 2010 at 11:03am
Maybe check the database BlogEntry and BlogEntry_Live tables for blogs entries with Null or malformed dates?
-
Re: [Notice] Array to string conversion

20 January 2010 at 11:14am
I remember posting this.
I know its no longer an issue though. Don't know how I fixed it though :\
| 2306 Views | ||
|
Page:
1
|
Go to Top |


