-
-
Notifications
You must be signed in to change notification settings - Fork 529
modError::hasError() returns false positive when loaded via getService() #9165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
opengeek submitted: |
enigmatic-user
pushed a commit
to enigmatic-user/revolution
that referenced
this issue
Feb 13, 2014
… getService When invoking modError via $modx->getService('error', 'error.modError') the message parameter was being passed as an empty array to the modError constructor. This would cause processors to fail prematurely when no errors occurred because hasError() checks for $this->message != '', and array() != ''.
enigmatic-user
pushed a commit
to enigmatic-user/revolution
that referenced
this issue
Feb 13, 2014
Merge branch 'release-2.2' * release-2.2: (40 commits) Bump version for 2.2.6-pl [modxcms#9178] Use PHP time for valid check in modDbRegisterMessage::getValidMessages() [modxcms#9165] Fix modError::hasError false positives when loaded via getService [modxcms#9029] Remove modRequest->loadErrorHandler dependency in runProcessor [modxcms#9156] Fix reload data for rendering multi-value TV types properly Prevent re-mapping custom Policies and Policy Templates [modxcms#7916] Fix Area functionality in Element Properties and Property Sets [modxcms#9080] Disable allow_tags_in_post System Setting on upgrade Add configcheck warning for allow_tags_in_post settings enabled fix css misprints Remove recursion in onCellDblClick() modx.grid.local.property.js Updated Dutch lexicon Remove unnecessary connector call on login tpl Update phpdoc comment Image optimization applied across distribution (changelog entry) Image Optimization Fixed copyright 2011 to 2012 [modxcms#9006] Fix ImageMagick which convert issue (PHP 5.3.2+) CS translation of updated strings in Setting Lexicon [modxcms#9080] Avoid filter order compromises in modX::sanitize() ...
danyaPostfactum
pushed a commit
to danyaPostfactum/revolution
that referenced
this issue
Mar 26, 2014
… getService When invoking modError via $modx->getService('error', 'error.modError') the message parameter was being passed as an empty array to the modError constructor. This would cause processors to fail prematurely when no errors occurred because hasError() checks for $this->message != '', and array() != ''.
danyaPostfactum
pushed a commit
to danyaPostfactum/revolution
that referenced
this issue
Mar 26, 2014
* release-2.2: [modxcms#8101] Add support for httpOnly session cookies in PHP 5.2+ Adding System Setting for HttpOnly cookies phpdoc comment correction [modxcms#8420] Add changelog entries for flock-independent file locking issues Bump version for 2.2.7-dev [#8423] Add multi-node support to flock-independent file locking Set log_level and log_target from xPDO constructor options Bump version for 2.2.6-pl [modxcms#9178] Use PHP time for valid check in modDbRegisterMessage::getValidMessages() [modxcms#9165] Fix modError::hasError false positives when loaded via getService [modxcms#9029] Remove modRequest->loadErrorHandler dependency in runProcessor [modxcms#9156] Fix reload data for rendering multi-value TV types properly Prevent re-mapping custom Policies and Policy Templates [modxcms#7916] Fix Area functionality in Element Properties and Property Sets [modxcms#9080] Disable allow_tags_in_post System Setting on upgrade Add configcheck warning for allow_tags_in_post settings enabled Conflicts: _build/build.sample.properties _build/build.xml _build/data/transport.core.system_settings.php core/docs/changelog.txt core/docs/version.inc.php core/model/modx/modx.class.php
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
opengeek created Redmine issue ID 9165
modError::hasError() returns true automatically after loading modError via getService calls like:
This is because getService passes the second parameter to modError's constructor as an empty array, instead of an empty string. Since hasError checks for $this->message != '', and array() != '', many processors fail with a general error but with no error messages.
Loading it like this gets around the problem for now:
The text was updated successfully, but these errors were encountered: