Setting open date and close date gives me these errors in quiz_validate as both $node->quiz_open and $node->quiz_close are strings not arrays:
Warning: Illegal string offset 'month' a quiz_validate() (línia 1452 /web/sites/all/modules/quiz/quiz.module).
Warning: Illegal string offset 'day' a quiz_validate() (línia 1452 de /web/sites/all/modules/quiz/quiz.module).
Warning: Illegal string offset 'year' a quiz_validate() (línia 1452 de /web/sites/all/modules/quiz/quiz.module).
Warning: Illegal string offset 'month' a quiz_validate() (línia 1452 de /web/sites/all/modules/quiz/quiz.module).
Warning: Illegal string offset 'day' a quiz_validate() (línia 1452 de /web/sites/all/modules/quiz/quiz.module).
Warning: Illegal string offset 'year' a quiz_validate() (línia 1452 de /web/sites/all/modules/quiz/quiz.module).
Just replacing statement with mktime by untouched $node properties fixes these errors.
Comment | File | Size | Author |
---|---|---|---|
#3 | quiz-quiz_validate-2387753-0.patch | 638 bytes | aleix |
Comments
Comment #1
djdevinComment #3
aleix CreditAttribution: aleix commentedComment #4
djdevinComment #5
djdevinThis patch passes tests, but could you give me the steps to reproduce the warnings? I couldn't get it to break.
Comment #6
aleix CreditAttribution: aleix commentedLet's see if I remember what happened...
I am testing again with the content type quiz, using the unpatched quiz.module, with the default content type (quiz). If I am entering both start and end date I get a bunch of errors:
Going a little further with:
I see:
Both are strings, so not possible to get these keys.
I am using the last version of drupal with php v. 5.4.36 ...
Comment #7
xjustyx CreditAttribution: xjustyx commentedI have the same Issue, I had this warning each time I make a new content of type quiz
Comment #8
djdevinThanks, I was running on PHP 5.3 which doesn't trigger the error.
Fixed!