pub
logo
Facebook Instagram Youtube
Warning: Attempt to read property "value" on array (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Warning: Attempt to read property "value" on array

Exception

ErrorException

  1.                 if ((is_countable($offre->descriptions) ? \count($offre->descriptions) : 0) > 0) {
  2.                     $tmp $offre->descriptionsByLanguage($language);
  3.                     if (count($tmp) == 0) {
  4.                         $tmp = [$offre->descriptionsByLanguage()];//force fr
  5.                     }
  6.                     $description $tmp[0]->value;
  7.                 }
  8.                 $this->tagsOffre($offre$language);
  9.                 $image $offre->firstImage();
  10.                 if (!$image) {
  11.                     $image get_template_directory_uri().'/assets/tartine/bg_home.jpg';
PostUtils->VisitMarche\ThemeTail\Lib\{closure}(object(Offre))
array_map(object(Closure), array(object(Offre), object(Offre), object(Offre), object(Offre))) in /home/visitmp/www/wp-content/themes/visittail/Lib/PostUtils.php (line 46)
  1.      * @return array|CommonItem[]
  2.      */
  3.     public function convertOffresToArray(array $offresint $categoryIdstring $language): array
  4.     {
  5.         return array_map(
  6.             function ($offre) use ($categoryId$language) {
  7.                 $name $offre->nameByLanguage($language);
  8.                 $description null;
  9.                 if ((is_countable($offre->descriptions) ? \count($offre->descriptions) : 0) > 0) {
  10.                     $tmp $offre->descriptionsByLanguage($language);
  11.                     if (count($tmp) == 0) {
PostUtils->convertOffresToArray(array(object(Offre), object(Offre), object(Offre), object(Offre)), 9, 'fr') in /home/visitmp/www/wp-content/themes/visittail/archive.php (line 83)
  1. }
  2. //fusion offres et articles
  3. $postUtils = new PostUtils();
  4. $posts $postUtils->convertPostsToArray($posts);
  5. $offres $postUtils->convertOffresToArray($offres$cat_ID$language);
  6. $offres = [...$posts, ...$offres];
  7. Twig::rendPage(
  8.     '@VisitTail/category.html.twig',
  9.     [
include('/home/visitmp/www/wp-content/themes/visittail/archive.php') in /home/visitmp/www/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/home/visitmp/www/wp-includes/template-loader.php') in /home/visitmp/www/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/home/visitmp/www/wp-blog-header.php') in /home/visitmp/www/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Stack Trace

ErrorException
ErrorException:
Warning: Attempt to read property "value" on array

  at /home/visitmp/www/wp-content/themes/visittail/Lib/PostUtils.php:54
  at VisitMarche\ThemeTail\Lib\PostUtils->VisitMarche\ThemeTail\Lib\{closure}(object(Offre))
  at array_map(object(Closure), array(object(Offre), object(Offre), object(Offre), object(Offre)))
     (/home/visitmp/www/wp-content/themes/visittail/Lib/PostUtils.php:46)
  at VisitMarche\ThemeTail\Lib\PostUtils->convertOffresToArray(array(object(Offre), object(Offre), object(Offre), object(Offre)), 9, 'fr')
     (/home/visitmp/www/wp-content/themes/visittail/archive.php:83)
  at include('/home/visitmp/www/wp-content/themes/visittail/archive.php')
     (/home/visitmp/www/wp-includes/template-loader.php:106)
  at require_once('/home/visitmp/www/wp-includes/template-loader.php')
     (/home/visitmp/www/wp-blog-header.php:19)
  at require('/home/visitmp/www/wp-blog-header.php')
     (/home/visitmp/www/index.php:17)