#3246 closed Defect (fixed)
ElggMetadata(<id>) is completely broken
| Reported by: | cash | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8.0 |
| Component: | Core | Version: | 1.0 |
| Severity: | major | Keywords: | |
| Cc: | brett@… | Difficulty: | easy |
Description
While looking at #3238, I discovered that you cannot do this:
$metadata = new ElggMetadata(862); echo $metadata->name;
You get back a corrupted object when you try to do that. As near as I can tell, this has always been the case with Elgg.
My guess is that no one uses the constructor that way. If anyone ever does, they will be in for a load of trouble.
Change History (6)
comment:1 Changed 2 years ago by cash
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 2 years ago by cash
(In [svn:8852]) Refs #3238 #3246 anootations needed the same fixes as metadata
comment:3 Changed 2 years ago by cash
(In [svn:8853]) Refs #3238 #3246 integrated fixes for annotations into 1.7 branch
comment:4 Changed 2 years ago by brettp
Was this a separate issue than #2897?
comment:5 Changed 2 years ago by cash
Huh, that's funny. No, same issue. Wonder why it worked for me before.
comment:6 Changed 2 years ago by brettp
No, I had it working occasionally too when I re-tested and meant to check the access sql to make sure there weren't discrepancies when loading via id vs db row. I'll do a bit more testing to make sure it's working as expected.

(In [svn:8849]) Fixes #3246 fixed ElggMetadata() constructor