Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to create content I get this error:
Fatal error: Call to a member function on a non-object in /home/virtual/site1/fst/var/www/html/test/modules/duration/duration_element.module on line 58
any ideas on how to fix it?
Comments
Comment #1
farsout68 CreditAttribution: farsout68 commentedSorry, I forgot to mention that I'm running Drupal 6.6
Comment #2
jpetso CreditAttribution: jpetso commentedThat would mean that the
$duration
variable does not contain an object, which is strange because there are two possible cases due to the if-condition that leads to line 58:I have no idea how there can ever be a non-object for $duration on line 58. For the lack of other pointers... which PHP version are you using?
Comment #3
jpetso CreditAttribution: jpetso commentedTitle change.
Comment #4
farsout68 CreditAttribution: farsout68 commentedSorry for the delayed response... the version of PHP is 4.3.11
Comment #5
jpetso CreditAttribution: jpetso commentedPHP 4... ouch. With object handling completely reworked in PHP 5, I guess there's just some incompatibility there, and I don't intend to downgrade to PHP 4 just to support a PHP version that is already unsupported by upstream for nearly a year. If you can fix the cause of the error by yourself, I might be willing to incorporate your patch... otherwise, with PHP 4 as the suspected villain, this is a "won't fix". Sorry.
Leaving this issue open as a pointer to include a PHP 5 requirement in the info files.
Comment #6
farsout68 CreditAttribution: farsout68 commentedLOL, yeah... I figured the version of PHP would be a problem. I'm going to upgrade today and see what happens. Thanks for you help.