Better error
This commit is contained in:
parent
a3c4f69e5d
commit
dc7b2bae2d
@ -297,6 +297,9 @@ trait TL
|
|||||||
case '!X':
|
case '!X':
|
||||||
return $object;
|
return $object;
|
||||||
case 'Vector t':
|
case 'Vector t':
|
||||||
|
if (!$this->is_array($object)) {
|
||||||
|
throw new Exception("You didn't provide a valid array");
|
||||||
|
}
|
||||||
$concat = \danog\PHP\Struct::pack('<i', $this->constructors->find_by_predicate('vector')['id']);
|
$concat = \danog\PHP\Struct::pack('<i', $this->constructors->find_by_predicate('vector')['id']);
|
||||||
$concat .= \danog\PHP\Struct::pack('<i', count($object));
|
$concat .= \danog\PHP\Struct::pack('<i', count($object));
|
||||||
foreach ($object as $current_object) {
|
foreach ($object as $current_object) {
|
||||||
|
Loading…
Reference in New Issue
Block a user