Warning: Illegal string offset ‘id’
-
Hi! I’ve been trying to find a fix to this problem without any results. Does someone know what I should change in our code in order to get rid of the warning message?
`Warning: Illegal string offset ‘id’ in /home/customer/www/anielaparys.com/public_html/wp-content/themes/aniela-parys/about.php on line 11
Warning: Illegal string offset ‘link_url’ in /home/customer/www/anielaparys.com/public_html/wp-content/themes/aniela-parys/about.php on line 11
Warning: Cannot assign an empty string to a string offset in /home/customer/www/anielaparys.com/public_html/wp-content/themes/aniela-parys/about.php on line 11`
Our code:
<?php
// Template Name: Aboutdo_action( ‘get_header’ );
require_once ‘partials/site-common.php’;
$images = get_field(‘gallery’);
if ( $images ) {
for ( $i=0; $i<count($images); $i++) {
$images[$i][‘link_url’] = get_field(‘link_url’, $images[$i][‘id’]);
}
}$context[‘left_info’] = get_field( ‘left_info’ );
$context[‘contact_information’] = get_field( ‘contact_information’ );//$footer_menu_id = get_term_by( ‘slug’, ‘footer’, ‘nav_menu’ )->term_id;
//$context[‘footer’] = new TimberMenu( $footer_menu_id );Timber::render( ‘about.twig’, $context );
do_action( ‘get_footer’ );
The page I need help with: [log in to see the link]
- The topic ‘Warning: Illegal string offset ‘id’’ is closed to new replies.