Looks like Shaun just fixed #1 by removing GPC from runProcessor. Looks like it’ll be in 2.0.6
https://github.com/modxcms/revolution/commit/404e024bf7110d494001d9c1cb8c67deb2f0a428
Quote from: ChuckTrukk at Dec 15, 2010, 03:35 PM
Looks like Shaun just fixed #1 by removing GPC from runProcessor. Looks like it’ll be in 2.0.6
https://github.com/modxcms/revolution/commit/404e024bf7110d494001d9c1cb8c67deb2f0a428
Yup. These guys are fast.
-
☆ A M B ☆
- 3,112 Posts
Quote from: BobRay at Dec 13, 2010, 11:34 PM
No, I had it right in the code. The call to the processor is successful and the new resource is created, but I’m not getting the resource object with $response->getObject().
I’m getting back the equivalent of resource->toArray().
This works:
$objectArray = $response->getObject();
$this->resource = $this->modx->getObject('modResource',$objectArray['id']);
Shouldn’t getObject() just return the object if there is one and null if not rather than an array of the objects fields?
If not, maybe it should be called getObjectArray(), getObjectFields() or getObjectToArray() to avoid confusion.
Tested and works.
<?php
$object = $response->getObject();
$id = $object['id'];
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Yes, I use that, but I still contend that something called getObject() should return an object.