Title: UnCaught Type Error
Last modified: January 17, 2023

---

# UnCaught Type Error

 *  Resolved [charles godwin](https://wordpress.org/support/users/charlesgodwin/)
 * (@charlesgodwin)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/uncaught-type-error-9/)
 * We are getting this error when running Version 2.5 of the free version.
 * PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string
   in /home/ogsonca/public_html/wp-content/plugins/cool-timeline/includes/ctl-helper-
   functions.php:52
 * We are running this on a multisite, in one site only, with PHP version 8.1.14
 * Here is the short code.
 * [cool-timeline layout="default" skin="default" show-posts="25" order="DESC" icons
   ="YES"]
 * This used to work with a version 1.5 of Cool-timeline pro from 2016. But that
   version is generating lots of these warnings Trying to access array offset on
   value of type bool and needed to be replaced.
 * What do you suggest. We have disabled the plugin for now.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-type-error-9%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Jyoti Bhandari](https://wordpress.org/support/users/jyoti197/)
 * (@jyoti197)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/uncaught-type-error-9/#post-16393030)
 * Hi [@charlesgodwin](https://wordpress.org/support/users/charlesgodwin/),
 * Sorry for the delay in response. Actually I have checked our plugin in multisite
   but no such issue found.
 * Please replace line no. 52 with below shared code:-
 * $ctl_story_date = isset($ctl_story_type[‘ctl_story_date’])?$ctl_story_type[‘ctl_story_date’]:”;
 * and line no. 53 with below shared code :-
 * if (!empty($ctl_story_date)) {
 *  If you are facing this issue again, please elaborate a little bit more with 
   the help of the screenshot so I can take a closer look.
 * Thanks & Regards
 *  Thread Starter [charles godwin](https://wordpress.org/support/users/charlesgodwin/)
 * (@charlesgodwin)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/uncaught-type-error-9/#post-16393220)
 * I got it working with one more change.
 * I am using PHP 8.1, that may explain the differences.
 * $ctl_story_type = get_post_meta($post_id, '', true); @ line 51 is returning an
   array of arrays. See the print_r output below.
 * I modified line 53 to this:(I added [0])
   $ctl_story_date = isset($ctl_story_type[‘
   ctl_story_date’])?$ctl_story_type[‘ctl_story_date’][0]:”;
 *     ```wp-block-code
        error_log(print_r($ctl_story_type, true));
       [20-Jan-2023 13:32:16 UTC] Array
       (
           [_edit_last] => Array
               (
                   [0] => 1
               )
   
           [_edit_lock] => Array
               (
                   [0] => 1507998950:1
               )
   
           [ctl_story_year] => Array
               (
                   [0] => 1938
               )
   
           [ctl_story_date] => Array
               (
                   [0] => 10/14/2017 12:38
               )
   
           [story_format] => Array
               (
                   [0] => default
               )
   
           [img_cont_size] => Array
               (
                   [0] => full
               )
   
           [fa_field_icon] => Array
               (
                   [0] =>
               )
   
           [tc-thumb-fld] => Array
               (
                   [0] => a:2:{s:9:"_thumb_id";b:0;s:11:"_thumb_type";s:10:"attachment";}
               )
   
           [ctl_story_timestamp] => Array
               (
                   [0] => 201710141238
               )
       )
       ```
   
    -  This reply was modified 3 years, 4 months ago by [charles godwin](https://wordpress.org/support/users/charlesgodwin/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘UnCaught Type Error’ is closed to new replies.

 * ![](https://ps.w.org/cool-timeline/assets/icon-256x256.gif?rev=3365763)
 * [Cool Timeline (Horizontal & Vertical Timeline)](https://wordpress.org/plugins/cool-timeline/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cool-timeline/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cool-timeline/)
 * [Active Topics](https://wordpress.org/support/plugin/cool-timeline/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cool-timeline/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cool-timeline/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [charles godwin](https://wordpress.org/support/users/charlesgodwin/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/uncaught-type-error-9/#post-16393220)
 * Status: resolved