PluginProbe
CSS & JavaScript Toolbox / 6.0.9
CSS & JavaScript Toolbox v6.0.9
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | framework/events/events.class.php +4 -4 6.06.0.9 View file →
@@ -215,9 +215,9 @@
215 215 $event = $events[$type->type];
216 216 // Create subject object! and bind live events!
217 217 $subject = $this->subjects[$event['id']] = $this->createSubject($event);
218 218 // Live events!
219 - $lives = (array) self::$live[$this->targetClass][$event['id']];
219 + $lives = isset(self::$live[$this->targetClass][$event['id']]) ? self::$live[$this->targetClass][$event['id']] : array();
220 220 foreach ($lives as $live) {
221 221 $subject[] = $live['observer'];
222 222 }
223 223 }
@@ -229,9 +229,9 @@
229 229 *
230 230 * @param mixed $type
231 231 * @return CJTWordpressEvents
232 232 */
233 - public function getTypeEvents($typeName, $typePrefixed = true) {
233 + public static function getTypeEvents($typeName, $typePrefixed = true) {
234 234 $type = self::parseEventType($typeName, $typePrefixed);
235 235 if (!self::$classes[$type->class]) {
236 236 throw new Exception("Type not found!! Could not find {$typeName}!");
237 237 }
@@ -261,9 +261,9 @@
261 261 *
262 262 * @param mixed $typeName
263 263 * @param mixed $observer
264 264 */
265 - public function on($typeName, $observer) {
265 + public static function on($typeName, $observer) {
266 266 $type = self::parseEventType($typeName, false);
267 267 // Create live event!
268 268 $on = array();
269 269 $on['observer'] = $observer;
@@ -274,9 +274,9 @@
274 274 * put your comment there...
275 275 *
276 276 * @param mixed $type
277 277 */
278 - public function parseEventType($type, $typePrefixed = true) {
278 + public static function parseEventType($type, $typePrefixed = true) {
279 279 $separator = '.';
280 280 $prefix = 'on';
281 281 // CLASS.TYPE
282 282 $parts = explode('.', $type);