Fatal error when trying to add a profile

harrisben - October 17, 2008 - 05:55
Project:Signwriter
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

When clicking Add Profile, the following error occurs:

Fatal error: __clone method called on non-object in /XXX/sites/all/modules/signwriter/signwriter.module on line 444

I first encountered this with the 6.x-1.0 release and the 6.x-1.x-dev (15-Oct-08) also exhibits this problem. The module is non-functional because of this problem.

#1

behindthepage - October 17, 2008 - 13:42

Short term fix
If you comment line 444 out it works.
e.g.
//$preview_profile = clone $p;

Regards
Geoff

#2

eMPee584 - October 26, 2008 - 21:57
Status:active» needs review

i think replacing that line with

<?php
  
if (is_object($p)) {
   
$preview_profile = clone $p;
  }
  else {
   
$preview_profile = new stdClass();
  }
?>
should be an appropiate fix.

#3

harrisben - October 27, 2008 - 04:23

After testing the above it seems to work. Thanks!

#4

eMPee584 - October 28, 2008 - 10:20
Status:needs review» reviewed & tested by the community

cool.

#5

Justin W Freeman - October 30, 2008 - 03:07
Status:reviewed & tested by the community» fixed

This has now been fixed in the 6.x-1.1 release.

#6

Anonymous (not verified) - November 13, 2008 - 03:11
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.