[libvirt-php][PATCH 10/14] examples: Don't report errors when looking up a domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 examples/libvirt.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/libvirt.php b/examples/libvirt.php
index 14436d8..2cab7a8 100644
--- a/examples/libvirt.php
+++ b/examples/libvirt.php
@@ -210,9 +210,9 @@ class Libvirt {
         if (is_resource($nameRes))
             return $nameRes;
 
-        $dom=libvirt_domain_lookup_by_name($this->conn, $nameRes);
+        $dom=@libvirt_domain_lookup_by_name($this->conn, $nameRes);
         if (!$dom) {
-            $dom=libvirt_domain_lookup_by_uuid_string($this->conn, $nameRes);
+            $dom=@libvirt_domain_lookup_by_uuid_string($this->conn, $nameRes);
             if (!$dom)
                 return $this->_set_last_error();
         }
-- 
2.8.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]