• Default avatar
    aka-ra    
     a year ago
    0

    I've just purchased Awo Coupon and installed it into my Joomla site and got this error message when trying to open the component.

    0 strpos(): Argument #1 ($haystack) must be of type string, array given

    The setup is Joomla 4.1.5, HikaShop 4.6.0, AwoCoupon 4.0.0.3

    PHP 8.1.7

    If I change to PHP 7 then the AwoCoupon component opens without error.

  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    I installed the exact same versions:
    - awocoupon 4.0.0.3
    - hikashop 4.6.0
    - joomla 4.1.5
    - php 8.1.7

    And for me it works fine, no errors.  I assume this is the backend?  Can you go to global configuration and temporarily set debug mode to 'yes'?  Do you get a full trace on the error?

  • Default avatar
    aka-ra    
     a year ago
    0

    Call stack#FunctionLocation1()JROOT/administrator/components/com_awocoupon/src/Controller/DisplayController.php:452strpos()JROOT/administrator/components/com_awocoupon/src/Controller/DisplayController.php:453AwoDev\Component\AwoCoupon\Administrator\Controller\DisplayController->display()JROOT/libraries/src/MVC/Controller/BaseController.php:7354Joomla\CMS\MVC\Controller\BaseController->execute()JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:1465Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()JROOT/libraries/src/Component/ComponentHelper.php:3896Joomla\CMS\Component\ComponentHelper::renderComponent()JROOT/libraries/src/Application/AdministratorApplication.php:1437Joomla\CMS\Application\AdministratorApplication->dispatch()JROOT/libraries/src/Application/AdministratorApplication.php:1868Joomla\CMS\Application\AdministratorApplication->doExecute()JROOT/libraries/src/Application/CMSApplication.php:2789Joomla\CMS\Application\CMSApplication->execute()JROOT/administrator/includes/app.php:6310require_once()JROOT/administrator/index.php:32

     Return to Dashboard

  • Your avatar
    seyi    
     a year ago
    0

    Ok, can you make a modification to one of the files?  Specifically this file:
    \administrator\components\com_awocoupon\src\Controller\DisplayController.php around line 45 is this:
    <?php
            
    if ( ! empty( $script ) && strpos$script'CodeMirror' ) !== false ) {
    ?>

    Change it to this:
    <?php
            
    if ( != ) {
    ?>

    That should stop the issue.
  • Default avatar
    aka-ra    
     a year ago
    0

    Thank you Seyi. That has indeed fixed the issue. :-)