Merge pull request #22851 from owncloud/issue-22849-php54-for-comments

ucwords does not support delimiter before 5.4.32
This commit is contained in:
Thomas Müller 2016-03-04 14:06:25 +01:00
commit 8be6054e5c
1 changed files with 1 additions and 1 deletions

View File

@ -362,7 +362,7 @@ class Comment implements IComment {
protected function fromArray($data) {
foreach(array_keys($data) as $key) {
// translate DB keys to internal setter names
$setter = 'set' . str_replace('_', '', ucwords($key,'_'));
$setter = 'set' . implode('', array_map('ucfirst', explode('_', $key)));
$setter = str_replace('Timestamp', 'DateTime', $setter);
if(method_exists($this, $setter)) {