Skip to content

Instantly share code, notes, and snippets.

@ProxiBlue
Created May 12, 2020 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProxiBlue/ab9c483fb95ea3fb77931ff439e76390 to your computer and use it in GitHub Desktop.
Save ProxiBlue/ab9c483fb95ea3fb77931ff439e76390 to your computer and use it in GitHub Desktop.
quickbooks api class exists noise log patch
diff --git a/src/Core/Http/Serialization/XmlObjectSerializer.php b/src/Core/Http/Serialization/XmlObjectSerializer.php
index 1c7d865..4a4a3cc 100644
--- a/src/Core/Http/Serialization/XmlObjectSerializer.php
+++ b/src/Core/Http/Serialization/XmlObjectSerializer.php
@@ -83,9 +83,9 @@ class XmlObjectSerializer extends IEntitySerializer
private static function PhpObjFromXml($className, $xmlStr)
{
$className = trim($className);
- if (class_exists($className, CoreConstants::USE_AUTOLOADER)) {
+ if (@class_exists($className, CoreConstants::USE_AUTOLOADER)) {
$phpObj = new $className;
- } elseif (class_exists(CoreConstants::NAMEPSACE_DATA_PREFIX . $className, CoreConstants::USE_AUTOLOADER)) {
+ } elseif (@class_exists(CoreConstants::NAMEPSACE_DATA_PREFIX . $className, CoreConstants::USE_AUTOLOADER)) {
$className = CoreConstants::NAMEPSACE_DATA_PREFIX . $className;
$phpObj = new $className;
} else {
diff --git a/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php b/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php
index addf301..a132ab7 100644
--- a/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php
+++ b/src/XSD2PHP/src/com/mikebevz/xsd2php/Bind.php
@@ -151,9 +151,9 @@ class Bind extends Common
*Vish Singh: Solution to Bug # IPP-4748
*Add Check if the class Exists. @Hao
*/
- if (class_exists($className, CoreConstants::USE_AUTOLOADER)) {
+ if (@class_exists($className, CoreConstants::USE_AUTOLOADER)) {
//Do nothing
- } elseif (class_exists(CoreConstants::NAMEPSACE_DATA_PREFIX . $className)) {
+ } elseif (@class_exists(CoreConstants::NAMEPSACE_DATA_PREFIX . $className)) {
$className = CoreConstants::NAMEPSACE_DATA_PREFIX . $className;
} else {
throw new \Exception("Can't find corresponding CLASS for className" . $className . " in Bind.php");
@@ -177,7 +177,7 @@ class Bind extends Common
if (!property_exists($model, $name)) {
throw new \RuntimeException("Model " . get_class($model) . " does not have property " . $name);
}
- if (!class_exists($className)) {
+ if (!@class_exists($className)) {
//print_r($className."\n");
$propertyDocs = $refl->getProperty($name)->getDocComment();
$docs = $this->parseDocComments($propertyDocs);
@@ -242,7 +242,7 @@ class Bind extends Common
if (!property_exists($model, $child->nodeName)) {
throw new \RuntimeException("Model does not have property ".$child->nodeName);
}
- if (!class_exists($child->nodeName)) {
+ if (!@class_exists($child->nodeName)) {
$propertyDocs = $refl->getProperty($child->nodeName)->getDocComment();
$docs = $this->parseDocComments($propertyDocs);
$type = $docs['xmlType'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment