xpdo icon indicating copy to clipboard operation
xpdo copied to clipboard

xPDO->addPackage returns true even if xPDO->setPackageMeta fails

Open Mark-H opened this issue 7 years ago • 1 comments

In https://github.com/modxcms/xpdo/blob/3.x/src/xPDO/xPDO.php#L474-L476, changing $added = true; to $added = $this->setPackageMeta will allow calls to addPackage to get the proper true/false dependant on the actual success.

Mark-H avatar Jul 26 '18 20:07 Mark-H

It should probably log an error, as well.

opengeek avatar Jul 26 '18 23:07 opengeek