Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #17 from livingos/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
damonjones committed Dec 1, 2016
2 parents 8c35570 + 679fad8 commit 9de0fb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/YDD/Vebra/API.php
Expand Up @@ -413,9 +413,10 @@ public function getProperty($clientId, $propertyId)

$arr = array();
foreach ($xml->paragraphs->paragraph as $p) {

$paragraph = new Paragraph;
$paragraph->setName(self::normalise($p->name, 'string'));
$paragraph->setFile(self::normalise($p->file, 'int'));
$paragraph->setFile(self::normalise($p->file->attributes()['ref'], 'int'));
$paragraph->setDimension(
new Dimension(
self::normalise($p->dimensions->metric, 'string'),
Expand Down
2 changes: 1 addition & 1 deletion lib/YDD/Vebra/Model/AttributedModel.php
Expand Up @@ -56,7 +56,7 @@ public function setAttribute($key, $value)
switch ($type) {
case 'boolean':
case 'bool':
$value = (bool) $value;
$value = (bool) filter_var($value, FILTER_VALIDATE_BOOLEAN);
break;
case 'integer':
case 'int':
Expand Down
2 changes: 1 addition & 1 deletion lib/YDD/Vebra/Model/Paragraph.php
Expand Up @@ -24,7 +24,7 @@ class Paragraph extends AttributedModel

protected $name; // varchar 255
protected $file; // int (index of the file, see Property's files property)
protected $dimensions; // Dimension
protected $dimension; // Dimension
protected $text;

/**
Expand Down

0 comments on commit 9de0fb5

Please sign in to comment.