ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP error notice when creating/editing entry

August 25, 2010 12:44pm

Subscribe [5]
  • #1 / Aug 25, 2010 12:44pm

    LucPestille

    146 posts

    This question may be related to a resolved thread.

    I’m getting the same error as above, after upgrading to the latest build;

    A PHP Error was encountered
    Severity: Notice
    Message: Uninitialized string offset: 0
    Filename: cp/content_publish.php
    Line Number: 1544

    etc etc…

    Clearing the cache doesn’t want to help. =/

  • #2 / Aug 25, 2010 12:57pm

    LucPestille

    146 posts

    This is something to do with custom layouts - I reset the layout and voila, no error. Probably a bug that needs looking at…

  • #3 / Aug 25, 2010 1:43pm

    Sue Crocker

    26054 posts

    Luc, can you replicate this every time? If so, what are the steps to reproduce?

  • #4 / Aug 30, 2010 6:41am

    Low

    407 posts

    I was also getting these errors with a custom publish form. I narrowed it down to around line #1520 in cp/content_publish.php. It loops through publish tabs and sets some values per tab:

    foreach($vars['publish_tabs'] as $tab => $val)
    {
      foreach($val as $key => $custom)
      {
        // lots of code
      }
    }

    The code assumes $custom will be an array with several keys/values, but the first element encountered (in this case) is an empty string (with key ‘_tab_label’). I fixed this issue temporarily with this code inside the second foreach:

    if ( ! is_array($custom)) continue;

    That gets rid of the notices.

  • #5 / Aug 30, 2010 5:51pm

    Ingmar

    29245 posts

    Thanks for the report, Lodewijk. Luc, adding to what Sue said, can you reproduce reliably?

  • #6 / Sep 10, 2010 6:25pm

    Brandon Jones

    5500 posts

    LucPestille and Lodewijk,

    Were these EE installations upgrades or clean installs?

  • #7 / Sep 13, 2010 4:24am

    Low

    407 posts

    For me, it was a clean 2.1 install which has had a build upgrade.

  • #8 / Sep 13, 2010 9:13am

    Sue Crocker

    26054 posts

    Thanks, Low.

    Luc? What about you?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases