Skip to content
Browse files

in Augeas::match() an exception must be thrown if path is invalid

  • Loading branch information...
1 parent 4911097 commit 63b09892550405e717ba4fef794453a1af035589 @ppadron committed Nov 18, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 augeas.c
View
5 augeas.c
@@ -323,6 +323,11 @@ PHP_METHOD(Augeas, match)
retval = aug_match(aug->augeas, path, &matches);
array_init(return_value);
+
+ if (retval == -1) {
+ zend_throw_exception(augeas_ce_AugeasException, "the specified path is invalid");
+ return;
+ }
if (retval > 0) {
for (i=0; i<retval; i++) {

0 comments on commit 63b0989

Please sign in to comment.
Something went wrong with that request. Please try again.