We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 3 years ago

#2273 closed Defect (fixed)

ElggEntity::clearMetadata() is dangerous

Reported by: brettp Owned by: nickw
Priority: high Milestone: Elgg 1.8.0
Component: Core Version: 1.7
Severity: minor Keywords:
Cc: brettp Difficulty: trivial

Description

Takes an optional param of $metadata_name. If that isn't passed, all metadata on the entity is removed.

$md_name = 'important_stuff';
$entity->clearMetadata($mdname);
// oops.

Could make clearMetadata() mimic clearAnnotations()

Change History (3)

comment:1 Changed 3 years ago by brettp

  • Difficulty set to trivial
  • Priority changed from normal to high

comment:2 Changed 3 years ago by brettp

  • Owner set to nickw

comment:3 Changed 3 years ago by nickw

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:7301]) Updating ElggEntity::clearMetaData() to fail when passed a non-existent metadata name.

Fixes #2273

Note: See TracTickets for help on using tickets.