This commit is contained in:
James Cole
2018-03-10 20:25:11 +01:00
parent c8ecb3e0ee
commit 85dc1263ea
2 changed files with 26 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
use Carbon\Carbon;
use Exception;
use FireflyIII\Factory\TransactionJournalFactory;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
@@ -376,6 +377,9 @@ class JournalRepository implements JournalRepositoryInterface
*/
public function getMetaField(TransactionJournal $journal, string $field): ?string
{
$class = new \stdClass;
$class->value = 'hi there';
$value = null;
$cache = new CacheProperties;
$cache->addProperty('journal-meta');
@@ -394,7 +398,18 @@ class JournalRepository implements JournalRepositoryInterface
$value = $entry->data;
$cache->store($value);
return $value;
if (is_array($value)) {
return join(',', $value);
}
try {
$return = strval($value);
} catch (Exception $e) {
Log::error($e->getMessage());
return '';
}
return $return;
}
/**