-
-
Save totten/e983d23439addeb7f76b0d7f52679031 to your computer and use it in GitHub Desktop.
Print a notice every time `Civicrm` is instantiated. (Each has its own value of `$initialized`.)
This file contains 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
commit beb16c771a2694a2d5cc53005ea77ebfc9dd51be (HEAD -> master-too-much-init) | |
Author: Tim Otten <totten@civicrm.org> | |
Date: Fri Aug 4 23:28:05 2023 -0700 | |
(DEBUG) Print initialization message | |
diff --git a/src/Civicrm.php b/src/Civicrm.php | |
index 5177177..011c341 100644 | |
--- a/src/Civicrm.php | |
+++ b/src/Civicrm.php | |
@@ -17,6 +17,12 @@ class Civicrm { | |
*/ | |
protected $initialized = FALSE; | |
+ public function __construct() { | |
+ static $id = 0; | |
+ $id++; | |
+ fprintf(STDERR, "%s init # %d\n", __CLASS__, $id); | |
+ } | |
+ | |
/** | |
* Initialize CiviCRM. | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment