Viewing 4 replies - 1 through 4 (of 4 total)
  • Pt

    (@bncpeter)

    Me too, after upgrading PHP from 7.4.x to 8.1.x.

    Me too, after upgrading PHP to 8.0.x.??

    Mickael Maury

    (@mickaelmaury)

    The same for me :

    WordPress version 6.1.1
    Thème actif : Goya Child Theme (version 1.0.5.1)
    Extension actuelle : Meta pixel for WordPress (version 3.0.8)
    PHP version 8.0.27 Détails de l’erreur Une erreur de type E_ERROR a été causée dans la ligne 42 du fichier /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Normalizer.php. Message d’erreur : Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Normalizer.php:42
    Stack trace: 0 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Normalizer.php(42): strlen() 1 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/UserData.php(914): FacebookAds\Object\ServerSide\Normalizer::normalize() 2 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/UserData.php(871): FacebookAds\Object\ServerSide\UserData->normalizeHashDedup() 3 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php(373): FacebookAds\Object\ServerSide\UserData->normalize() 4 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(302): FacebookAds\Object\ServerSide\Event->normalize() 5 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(240): FacebookAds\Object\ServerSide\EventRequest->normalize() 6 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/EventRequest.php(235): FacebookAds\Object\ServerSide\EventRequest->defaultExecute() 7 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/core/FacebookServerSideEvent.php(108): FacebookAds\Object\ServerSide\EventRequest->execute() 8 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/core/ServerEventAsyncTask.php(147): FacebookPixelPlugin\Core\FacebookServerSideEvent::send() 9 /home/qfah1513/public_html/wp-content/plugins/official-facebook-pixel/vendor/techcrunch/wp-async-task/wp-async-task.php(164): FacebookPixelPlugin\Core\ServerEventAsyncTask->run_action() 10 /home/qfah1513/public_html/wp-includes/class-wp-hook.php(308): WP_Async_Task->handle_postback() 11 /home/qfah1513/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 12 /home/qfah1513/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 13 /home/qfah1513/public_html/wp-admin/admin-post.php(61): do_action() 14 {main} thrown

    It appears a very old version of the facebook/php-business-sdk was being used which wasn’t php8.1 compatible. I updated the composer.json file in the plugins root directory by removing the dev requirements as I couldn’t figure out the proper combination and then updated the facebook/php-business-sdk version (https://packagist.org/packages/facebook/php-business-sdk).

    After updating the composer.json I removed the composer.lock file and ran?composer update?which updated the package and appears to have resolved the issue.

    {
      "name": "facebook/pixel-for-wordpress",
      "description": "Facebook Pixel plugins for wordpress",
      "type": "project",
      "license": "GPL",
      "require": {
        "facebook/php-business-sdk": "16.0.1",
        "techcrunch/wp-async-task": "dev-master"
      },
      "autoload": {
        "psr-4": {
          "FacebookPixelPlugin\\": "./",
          "FacebookPixelPlugin\\Core\\": "core/",
          "FacebookPixelPlugin\\Integration\\": "integration/"
        }
      },
      "replace": {
        "guzzlehttp/guzzle": "*"
      }
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Receiving Uncaught TypeError: strlen()’ is closed to new replies.