Skip to content

New Issue in Joomla 4.2 #171

@joomlaplates-de

Description

@joomlaplates-de

Hi there,
in Joomla 4.2 you get an error like this
count(): Argument #1 ($value) must be of type Countable|array, null given
The problem is based on the file with the template html folder
>> mod_login/default.php
I have just removed the code from Line 52 - 67 and the issue is gone.
Here is the code which i´ve deleted

   <?php if (count($twofactormethods) > 1) : ?>
      <div id="form-login-secretkey" class="form-group">
         <?php if (!$params->get('usetext', 0)) : ?>
            <label for="modlgn-secretkey">
               <?php echo Text::_('JGLOBAL_SECRETKEY'); ?>
               <i class="fas fa-info-circle hasTooltip" title="<?php echo Text::_('JGLOBAL_SECRETKEY_HELP'); ?>"></i>
            </label>
            <div class="input-group">
               <input id="modlgn-secretkey" autocomplete="off" type="text" name="secretkey" class="form-control" tabindex="0" size="18" />
            </div>
         <?php else : ?>
            <label for="modlgn-secretkey"><?php echo Text::_('JGLOBAL_SECRETKEY'); ?></label>
            <input id="modlgn-secretkey" autocomplete="off" type="text" name="secretkey" class="form-control" tabindex="0" size="18" />
         <?php endif; ?>
      </div>
   <?php endif; ?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions