Skip to content

Commit 7104e37

Browse files
authored
Merge pull request #20 from Notanotherdotcom/patch-1
Bugfix for FieldListCommand.php
2 parents 1b28339 + b8da07a commit 7104e37

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/Commands/Field/FieldListCommand.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ protected function execute(InputInterface $input, OutputInterface $output) {
4747
// get available fields
4848
$fieldtypes = array();
4949
foreach (\ProcessWire\wire('modules') as $module) {
50-
if (preg_match('/^Fieldtype/', $module->name)) {
50+
if (preg_match('/^Fieldtype/', (string)$module->name)) {
5151
$fieldtypes[] = $module->name;
5252
}
5353
}
5454

5555
$headers = array('Name', 'Label', 'Type', 'Templates');
5656
$data = $this->getData($this->getFilter($input));
5757

58-
if (count($data->count) > 0) {
58+
if ($data->count > 0) {
5959
foreach ($data->content as $tag => $c) {
6060
$tools->writeInfo('--- ' . strtoupper($tag) . ' ---');
6161
$tables = new Tables($output);

0 commit comments

Comments
 (0)