Line 38:

$cell = $data['data'];

Get the error in the title as of php 5.4.3-1 on Arch Linux. Workaround is to hide errors and warnings, though not ideal.

Files: 

Comments

raveendrab’s picture

The error pops up on 7.x3.4 too. Line numbers 38 and 43.

asrob’s picture

Yeah, I got the same error after I installed 7.x-3.4 version and I also use PHP 5.4.3.

zamir’s picture

I have a same error message as following:
Warning: Illegal string offset 'data' in template_preprocess_calendar_month() (line 38 of E:\drupal\sites\all\modules\contrib\calendar\theme\theme.inc).
Warning: Illegal string offset 'data' in template_preprocess_calendar_month() (line 43 of E:\drupal\sites\all\modules\contrib\calendar\theme\theme.inc).

zamir’s picture

I added the following code snippet in file calendar\theme\theme.inc after line 37,then the error is missing:

    if (!isset($data['data'])) {
    continue;
    }
slippast’s picture

Solution #4 worked. Hopefully this will be fixed in the next update so I don't need to remember to hack the module. Thanks.

amphioxus’s picture

Thanks for the solution in #4... worked for me as well.

wusel’s picture

D5.17
Calendar 7.x-3.4+0-dev (2012-May-20)

Thanks for the solution in #4... worked for me as well.

rudyard55’s picture

I went to the dev 7.x-3.x-dev version, updated my date modules, re-saved all my date fields and then update.php and the problem cleared up for me.

marktheshark’s picture

Used #4 as well.

jabraben’s picture

Same problem and I guess I'll have to try #4 but shouldn't we get a response from the maintainers seeing as how this has been around for 3 months?

Hester Green’s picture

Worked like a charm until the latest Calendar Module update wiped it out. Why wasn't a solution to this May issue incorporated into the September module update?

Hester

marktheshark’s picture

Still present in latest dev.

IreneKraus’s picture

Where should we insert this proposed fix in the current version?

clearviz’s picture

Irene Kraus asked:

Where should we insert this proposed fix in the current version?

See this issue thread and, especially, post #3. It worked for me!

Regards,
Arnold

dsteplight’s picture

#4 worked for me also and I'm using , version = "7.x-3.4" of the Calendar module.

wooody’s picture

Thank you ,, works with me too.. ;-)

andile2012’s picture

#4 worked only partially for me - it solved the problem with the view pages but broke the block.

andile2012’s picture

I take that back. It works for me.

chlee’s picture

#4 does the job. Working fine.

danielbetz’s picture

Drupal v. 7.19
Calendar Module v. 7.x-3.4

Error still present.

Zamir's fix in post #4 works.

Daniel

pingers’s picture

tgshannon’s picture

I started to get this error on my localhost testing after cloning a production site where the problem does not occur.

tasetta’s picture

Solution in post #4 worked. Thanks ever so much!

savithac’s picture

Thanks for the solution in #4. It workes for me.

torstenzenk’s picture

#4 works for me too

cooldeeponline’s picture

#4 works for me too. Thanks!!!

prdctvtxt’s picture

adding #4 as a patch.

prdctvtxt’s picture

Status:Closed (duplicate)» Needs review

please review #27 patch of #4 solution.

Eglish’s picture

Thank you zamir for the solution (#4)

marktheshark’s picture

With this issue now open for over a year, shouldn't this module be changed to unmaintained / minimally maintained?

clemens.tolboom’s picture

Status:Needs review» Closed (duplicate)

This still is a duplicate of #1471400: Warning: Illegal string offset 'data' in template_preprocess_calendar_month (PHP 5.4.* and 7.x-3.x-dev) as @pingers tried to say in #21.

To let the maintainers fix issues we the users should help reduce the issue load :-)

karaoke’s picture

#4 thank you

Rick Brook’s picture

Same issue found with 7.x-3.4
editing theme.inc as per #4 works great.

karolus’s picture

Issue summary:View changes

Same issue with 7.x-3.4, updated to the more recent dev branch, same issues after multiple cache flushes. Adding the code snippet per #4 worked, though.

densolis’s picture

Fix in comment Number 4 still works.

beto_beto’s picture

Thanks for the solution in #4... worked for me as well.

d1v9d’s picture

Thank you Zamir. Your fix worked.

karolus’s picture

Quick FYI--
I know line numbers can differ at times, and when doing a recent update, applied the patch, but the error still persisted. To apply the patch, the code should look like this:

if (!isset($data['data'])) {
        continue;
      }

      $cell = $data['data'];

Once this order was set (I had placed the first three line behind what is now the last at first), the issue was resolved.

JamesOakley’s picture

@karolus - before you edited your post above this one, it said

Just did a site update to the latest version of Calendar, issue showed up. Entered patch code at #4, flushed caches, ran update.php multiple times, issue still present. To be sure, my PHP server is running 5.4.x. Will check more...

Just to say, I don't know what you meant by "latest version", but you need 7.x-3.x-dev. If you look at the commit logs, you'll see this was fixed relatively recently, so the fix is in the 7.x-3.x-dev branch. However the last tagged release was 7.x-3.4, dated May 2012. That definitely does not have this, or any other recent fixes, in it.

So anyone having this trouble should update to the -dev release and see if that fixes it.

lindarosi33’s picture

Hurray for solution #4!

simon fraser’s picture

thanks for help on this... same error, even after applying #4 solution... (and after copying the theme file from other sites using calendars successfully) however... #38 advice from Karolus re the placement of this code snippet did make the difference... and seems to be holding!
It is great to have help like this to refer to - thank you!

JamesOakley’s picture

@lindarosi33 and @simon_fraser: This issue has been fixed.

When you say you're still getting the error (needing solutions #4 or #38 instead), are you both using the 7.x-3.x-dev branch of the module?

Programming Paul’s picture

The issue is still occurring for me using calendar-7.x-3.4 updated in 2012-May-19. Solution 4 fixed the problem. This site is an upgrade from Drupal 6, so maybe it was an issue with the update script?

dadderley’s picture

The latest dev. 7.x-3.x-dev (2014-Jun-02), made the problem go away for me.

Vojtha’s picture

For me was 7.x-3.x-dev (2014-Jun-02) helpful too.

lidia_ua’s picture

Worked for me #4