Skip to content

Fixes issue #8 by providing a default 'where' value - #10

Open
jcdm wants to merge 1 commit into
modxcms:developfrom
jcdm:patch-1
Open

jcdm wants to merge 1 commit into
modxcms:developfrom
jcdm:patch-1

Conversation

@jcdm

@jcdm jcdm commented Jul 8, 2017

Copy link
Copy Markdown

There's been an issue with PHP7 (or MODX 2.5.7 - not totally sure which) where the user must add a &where=[] to the getArchives call to avoid a server 500 error.

This update provides that default in the snippet if no setting has been passed from the snippet call.

There's been an issue with PHP7 (or MODX 2.5.7 - not totally sure which) where the user must add a &where=`[]` to the getArchives call to avoid a server 500 error.

This update provides that default if no setting has been passed from the snippet call.
@jpdevries

Copy link
Copy Markdown

Anyone know if there is a maintainer for Archivist? Any volunteers? 😃

@arjen-t

arjen-t commented Jul 19, 2019

Copy link
Copy Markdown

What is the procedure within the MODX community to become the official maintainer of an existing package? I would be interested to take this one.

@rthrash

rthrash commented Aug 28, 2019

Copy link
Copy Markdown
Member

This pull request has been mentioned on Community. There might be relevant details there:

https://community.modx.com/t/archivist-landing-page-blank/1420/1

@matdave
matdave requested a review from garryn March 19, 2020 19:17
@gadgetto

Copy link
Copy Markdown

Is this repo still maintained? This pull request needs to be merged.

$where = $modx->getOption('where',$scriptProperties,false);
$where = $modx->getOption('where',$scriptProperties,"[]");
$where = is_array($where) ? $where : $modx->fromJSON($where);
$parameters = $modx->request->getParameters();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If where contains an invalid JSON, the following line has to be added.

$where = !empty($where) ? $where : array();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants