Just noticed this last week. There is no need for $mapping to be passed by reference in rdf_mapping_save.

It has the negative effect of giving an error if someone calls the function like this

rdf_mapping_save(array('mapping' => $mapping, ....));
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ngmaloney’s picture

FileSize
2.59 KB

Attached is a patch. New test was included that asserts hook can be executed with both a variable argument and an array declaration argument.

scor’s picture

Status: Active » Needs review

Nice, and it comes with a test :)

scor’s picture

Status: Needs review » Needs work
+++ modules/rdf/rdf.test	9 Dec 2010 00:49:35 -0000
@@ -695,3 +695,42 @@ class RdfGetRdfNamespacesTestCase extend
+      'description' => 'Test hook rdf_mapping_save() and assert it will save an argument passed as an array. (Bug fix #953494)',

I don't think we should include bug report # here.

Powered by Dreditor.

ngmaloney’s picture

Assigned: Unassigned » ngmaloney
FileSize
2.38 KB

Attached is patched revision, removing bug reference comment.

ngmaloney’s picture

Status: Needs work » Needs review
scor’s picture

Status: Needs review » Reviewed & tested by the community

looks good now, thanks ngmaloney!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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