diff --git a/src/Commands/Field/FieldListCommand.php b/src/Commands/Field/FieldListCommand.php index dc46e85..fc1b6a4 100644 --- a/src/Commands/Field/FieldListCommand.php +++ b/src/Commands/Field/FieldListCommand.php @@ -47,7 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { // get available fields $fieldtypes = array(); foreach (\ProcessWire\wire('modules') as $module) { - if (preg_match('/^Fieldtype/', $module->name)) { + if (preg_match('/^Fieldtype/', (string)$module->name)) { $fieldtypes[] = $module->name; } } @@ -55,7 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output) { $headers = array('Name', 'Label', 'Type', 'Templates'); $data = $this->getData($this->getFilter($input)); - if (count($data->count) > 0) { + if ($data->count > 0) { foreach ($data->content as $tag => $c) { $tools->writeInfo('--- ' . strtoupper($tag) . ' ---'); $tables = new Tables($output);