summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-30 17:36:04 +0100
committerRemi Collet <remi@remirepo.net>2018-01-30 17:36:04 +0100
commit47013783578b41a000b755e2726f057ecd4cd1cb (patch)
tree6a56d22ecf1e798c7889a6fc15eaf6bc005941e7 /README.md
parentcf809b71d4344aeb93378a577abc1ea18a3df323 (diff)
add option to retrieve error message instead of raising a warning
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index d572920..cbdc106 100644
--- a/README.md
+++ b/README.md
@@ -50,6 +50,7 @@ The return value is a hash table, or false if it fails.
[Release] => 1.fc25.remi
[Arch] => x86_64
)
+
php > print_r(rpminfo("tests/bidon.rpm", true));
Array
(
@@ -66,6 +67,16 @@ The return value is a hash table, or false if it fails.
...
[IsSource] =>
)
+
+ php > var_dump(rpminfo("missing.rpm"));
+ Warning: rpminfo(): Can't open 'missing.rpm': No such file or directory in php shell code on line 1
+ bool(false)
+
+ php > var_dump(rpminfo("missing.rpm", false, $error));
+ bool(false)
+ php > echo $error;
+ Can't open 'missing.rpm': No such file or directory
+
----