Download & Extend

Fatal error when trying to add a profile

Project:Signwriter
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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

Regards
Geoff

#2

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

After testing the above it seems to work. Thanks!

#4

Status:needs review» reviewed & tested by the community

cool.

#5

Status:reviewed & tested by the community» fixed

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

#6

Status:fixed» closed (fixed)

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