Bug fixes

This commit is contained in:
Matias Griese
2019-03-11 14:35:44 +02:00
parent 8b4cac7ba6
commit 7f86f8eb6f
2 changed files with 4 additions and 4 deletions

View File

@@ -171,7 +171,7 @@ class Flex implements \Countable
// Normalize key and type using fallback to default type if it was set.
[$key, $type, $guess] = $this->resolveKeyAndType($flexKey, $defaultType);
if ($type === '') {
if ($type === '' && $types) {
// Add keys which are not associated to any Flex type. They will be included to every Flex type.
foreach ($types as $type => &$array) {
$array[] = $key;

View File

@@ -48,7 +48,7 @@ class AbstractPagination implements PaginationInterface
protected $defaultOptions = [
'type' => 'page',
'limit' => 10,
'display' => 3,
'display' => 5,
'opening' => 0,
'ending' => 0,
'url' => null
@@ -186,8 +186,8 @@ class AbstractPagination implements PaginationInterface
// Make list like: 1 ... 4 5 6 ... 10
$range = range($this->pagesStart, $this->pagesStop);
$range[] = 1;
$range[] = $this->pages;
//$range[] = 1;
//$range[] = $this->pages;
natsort($range);
$range = array_unique($range);