Last active
December 18, 2015 15:58
-
-
Save Mikulas/5807905 to your computer and use it in GitHub Desktop.
DibiEvent.php patch for Diagnostics Panel - don't show source file from libs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/DibiEvent.php b/DibiEvent.php | |
index 9c5e609..89fe867 100644 | |
--- a/DibiEvent.php | |
+++ b/DibiEvent.php | |
@@ -71,9 +71,9 @@ class DibiEvent | |
} | |
$rc = new ReflectionClass('dibi'); | |
- $dibiDir = dirname($rc->getFileName()) . DIRECTORY_SEPARATOR; | |
+ $libsDir = realpath(__DIR__ . '/../../../../') . DIRECTORY_SEPARATOR; | |
foreach (debug_backtrace(FALSE) as $row) { | |
- if (isset($row['file']) && is_file($row['file']) && strpos($row['file'], $dibiDir) !== 0) { | |
+ if (isset($row['file']) && is_file($row['file']) && strpos($row['file'], $libsDir) !== 0) { | |
$this->source = array($row['file'], (int) $row['line']); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment