mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 17:54:44 +02:00
Fix issue processwire/processwire-issues#114
This commit is contained in:
@@ -1754,7 +1754,7 @@ abstract class Wire implements WireTranslatable, WireFuelable, WireTrackable {
|
|||||||
// this object has not yet been wired! use last known current instance as fallback
|
// this object has not yet been wired! use last known current instance as fallback
|
||||||
// note this condition is unsafe in multi-instance mode
|
// note this condition is unsafe in multi-instance mode
|
||||||
$wire = ProcessWire::getCurrentInstance();
|
$wire = ProcessWire::getCurrentInstance();
|
||||||
if(!$wire) return null;
|
if(!$wire) return is_object($name) ? $name : null; // there are no ProcessWire instances
|
||||||
if($name && $this->_wire === null) {
|
if($name && $this->_wire === null) {
|
||||||
$this->_wire = false; // false prevents this from being called another time for this object
|
$this->_wire = false; // false prevents this from being called another time for this object
|
||||||
$wire->_objectNotWired($this, $name, $value);
|
$wire->_objectNotWired($this, $name, $value);
|
||||||
@@ -1868,6 +1868,7 @@ abstract class Wire implements WireTranslatable, WireFuelable, WireTrackable {
|
|||||||
*/
|
*/
|
||||||
public function __debugInfo() {
|
public function __debugInfo() {
|
||||||
/** @var WireDebugInfo $debugInfo */
|
/** @var WireDebugInfo $debugInfo */
|
||||||
|
require_once(__DIR__ . '/WireDebugInfo.php');
|
||||||
$debugInfo = $this->wire(new WireDebugInfo());
|
$debugInfo = $this->wire(new WireDebugInfo());
|
||||||
return $debugInfo->getDebugInfo($this, true);
|
return $debugInfo->getDebugInfo($this, true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user