PageRenderTime 215ms CodeModel.GetById 81ms app.highlight 42ms RepoModel.GetById 68ms app.codeStats 1ms

/lib/Cake/Utility/Debugger.php

https://bitbucket.org/udeshika/fake_twitter
PHP | 720 lines | 432 code | 61 blank | 227 comment | 78 complexity | d9e3320cb355c3d4e5a305d4b68b22e8 MD5 | raw file
  1<?php
  2/**
  3 * Framework debugging and PHP error-handling class
  4 *
  5 * Provides enhanced logging, stack traces, and rendering debug views
  6 *
  7 * PHP 5
  8 *
  9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 11 *
 12 * Licensed under The MIT License
 13 * Redistributions of files must retain the above copyright notice.
 14 *
 15 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 16 * @link          http://cakephp.org CakePHP(tm) Project
 17 * @package       Cake.Utility
 18 * @since         CakePHP(tm) v 1.2.4560
 19 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 20 */
 21
 22App::uses('CakeLog', 'Log');
 23App::uses('String', 'Utility');
 24
 25/**
 26 * Provide custom logging and error handling.
 27 *
 28 * Debugger overrides PHP's default error handling to provide stack traces and enhanced logging
 29 *
 30 * @package       Cake.Utility
 31 * @link          http://book.cakephp.org/2.0/en/development/debugging.html#debugger-class
 32 */
 33class Debugger {
 34
 35/**
 36 * A list of errors generated by the application.
 37 *
 38 * @var array
 39 */
 40	public $errors = array();
 41
 42/**
 43 * The current output format.
 44 *
 45 * @var string
 46 */
 47	protected $_outputFormat = 'js';
 48
 49/**
 50 * Templates used when generating trace or error strings.  Can be global or indexed by the format
 51 * value used in $_outputFormat.
 52 *
 53 * @var string
 54 */
 55	protected $_templates = array(
 56		'log' => array(
 57			'trace' => '{:reference} - {:path}, line {:line}',
 58			'error' => "{:error} ({:code}): {:description} in [{:file}, line {:line}]"
 59		),
 60		'js' => array(
 61			'error' => '',
 62			'info' => '',
 63			'trace' => '<pre class="stack-trace">{:trace}</pre>',
 64			'code' => '',
 65			'context' => '',
 66			'links' => array()
 67		),
 68		'html' => array(
 69			'trace' => '<pre class="cake-error trace"><b>Trace</b> <p>{:trace}</p></pre>',
 70			'context' => '<pre class="cake-error context"><b>Context</b> <p>{:context}</p></pre>'
 71		),
 72		'txt' => array(
 73			'error' => "{:error}: {:code} :: {:description} on line {:line} of {:path}\n{:info}",
 74			'code' => '',
 75			'info' => ''
 76		),
 77		'base' => array(
 78			'traceLine' => '{:reference} - {:path}, line {:line}',
 79			'trace' => "Trace:\n{:trace}\n",
 80			'context' => "Context:\n{:context}\n",
 81		),
 82		'log' => array(),
 83	);
 84
 85/**
 86 * Holds current output data when outputFormat is false.
 87 *
 88 * @var string
 89 */
 90	protected $_data = array();
 91
 92/**
 93 * Constructor.
 94 *
 95 */
 96	public function __construct() {
 97		$docRef = ini_get('docref_root');
 98
 99		if (empty($docRef) && function_exists('ini_set')) {
100			ini_set('docref_root', 'http://php.net/');
101		}
102		if (!defined('E_RECOVERABLE_ERROR')) {
103			define('E_RECOVERABLE_ERROR', 4096);
104		}
105
106		$e = '<pre class="cake-error">';
107		$e .= '<a href="javascript:void(0);" onclick="document.getElementById(\'{:id}-trace\')';
108		$e .= '.style.display = (document.getElementById(\'{:id}-trace\').style.display == ';
109		$e .= '\'none\' ? \'\' : \'none\');"><b>{:error}</b> ({:code})</a>: {:description} ';
110		$e .= '[<b>{:path}</b>, line <b>{:line}</b>]';
111
112		$e .= '<div id="{:id}-trace" class="cake-stack-trace" style="display: none;">';
113		$e .= '{:links}{:info}</div>';
114		$e .= '</pre>';
115		$this->_templates['js']['error'] = $e;
116
117		$t = '<div id="{:id}-trace" class="cake-stack-trace" style="display: none;">';
118		$t .= '{:context}{:code}{:trace}</div>';
119		$this->_templates['js']['info'] = $t;
120
121		$links = array();
122		$link = '<a href="javascript:void(0);" onclick="document.getElementById(\'{:id}-code\')';
123		$link .= '.style.display = (document.getElementById(\'{:id}-code\').style.display == ';
124		$link .= '\'none\' ? \'\' : \'none\')">Code</a>';
125		$links['code'] = $link;
126
127		$link = '<a href="javascript:void(0);" onclick="document.getElementById(\'{:id}-context\')';
128		$link .= '.style.display = (document.getElementById(\'{:id}-context\').style.display == ';
129		$link .= '\'none\' ? \'\' : \'none\')">Context</a>';
130		$links['context'] = $link;
131
132		$this->_templates['js']['links'] = $links;
133
134		$this->_templates['js']['context'] = '<pre id="{:id}-context" class="cake-context" ';
135		$this->_templates['js']['context'] .= 'style="display: none;">{:context}</pre>';
136
137		$this->_templates['js']['code'] = '<pre id="{:id}-code" class="cake-code-dump" ';
138		$this->_templates['js']['code'] .= 'style="display: none;">{:code}</pre>';
139
140		$e = '<pre class="cake-error"><b>{:error}</b> ({:code}) : {:description} ';
141		$e .= '[<b>{:path}</b>, line <b>{:line}]</b></pre>';
142		$this->_templates['html']['error'] = $e;
143
144		$this->_templates['html']['context'] = '<pre class="cake-context"><b>Context</b> ';
145		$this->_templates['html']['context'] .= '<p>{:context}</p></pre>';
146	}
147
148/**
149 * Returns a reference to the Debugger singleton object instance.
150 *
151 * @param string $class
152 * @return object
153 */
154	public static function &getInstance($class = null) {
155		static $instance = array();
156		if (!empty($class)) {
157			if (!$instance || strtolower($class) != strtolower(get_class($instance[0]))) {
158				$instance[0] = new $class();
159			}
160		}
161		if (!$instance) {
162			$instance[0] = new Debugger();
163		}
164		return $instance[0];
165	}
166
167/**
168 * Recursively formats and outputs the contents of the supplied variable.
169 *
170 *
171 * @param mixed $var the variable to dump
172 * @return void
173 * @see Debugger::exportVar()
174 * @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::dump
175 */
176	public static function dump($var) {
177		pr(self::exportVar($var));
178	}
179
180/**
181 * Creates an entry in the log file.  The log entry will contain a stack trace from where it was called.
182 * as well as export the variable using exportVar. By default the log is written to the debug log.
183 *
184 * @param mixed $var Variable or content to log
185 * @param integer $level type of log to use. Defaults to LOG_DEBUG
186 * @return void
187 * @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::log
188 */
189	public static function log($var, $level = LOG_DEBUG) {
190		$source = self::trace(array('start' => 1)) . "\n";
191		CakeLog::write($level, "\n" . $source . self::exportVar($var));
192	}
193
194/**
195 * Overrides PHP's default error handling.
196 *
197 * @param integer $code Code of error
198 * @param string $description Error description
199 * @param string $file File on which error occurred
200 * @param integer $line Line that triggered the error
201 * @param array $context Context
202 * @return boolean true if error was handled
203 * @deprecated This function is superseded by Debugger::outputError()
204 */
205	public static function showError($code, $description, $file = null, $line = null, $context = null) {
206		$_this = Debugger::getInstance();
207
208		if (empty($file)) {
209			$file = '[internal]';
210		}
211		if (empty($line)) {
212			$line = '??';
213		}
214		$path = self::trimPath($file);
215
216		$info = compact('code', 'description', 'file', 'line');
217		if (!in_array($info, $_this->errors)) {
218			$_this->errors[] = $info;
219		} else {
220			return;
221		}
222
223		switch ($code) {
224			case E_PARSE:
225			case E_ERROR:
226			case E_CORE_ERROR:
227			case E_COMPILE_ERROR:
228			case E_USER_ERROR:
229				$error = 'Fatal Error';
230				$level = LOG_ERROR;
231			break;
232			case E_WARNING:
233			case E_USER_WARNING:
234			case E_COMPILE_WARNING:
235			case E_RECOVERABLE_ERROR:
236				$error = 'Warning';
237				$level = LOG_WARNING;
238			break;
239			case E_NOTICE:
240			case E_USER_NOTICE:
241				$error = 'Notice';
242				$level = LOG_NOTICE;
243			break;
244			default:
245				return;
246			break;
247		}
248
249		$data = compact(
250			'level', 'error', 'code', 'description', 'file', 'path', 'line', 'context'
251		);
252		echo $_this->outputError($data);
253
254		if ($error == 'Fatal Error') {
255			exit();
256		}
257		return true;
258	}
259
260/**
261 * Outputs a stack trace based on the supplied options.
262 *
263 * ### Options
264 *
265 * - `depth` - The number of stack frames to return. Defaults to 999
266 * - `format` - The format you want the return.  Defaults to the currently selected format.  If
267 *    format is 'array' or 'points' the return will be an array.
268 * - `args` - Should arguments for functions be shown?  If true, the arguments for each method call
269 *   will be displayed.
270 * - `start` - The stack frame to start generating a trace from.  Defaults to 0
271 *
272 * @param array $options Format for outputting stack trace
273 * @return mixed Formatted stack trace
274 * @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::trace
275 */
276	public static function trace($options = array()) {
277		$_this = Debugger::getInstance();
278		$defaults = array(
279			'depth'		=> 999,
280			'format'	=> $_this->_outputFormat,
281			'args'		=> false,
282			'start'		=> 0,
283			'scope'		=> null,
284			'exclude'	=> array('call_user_func_array', 'trigger_error')
285		);
286		$options = Set::merge($defaults, $options);
287
288		$backtrace = debug_backtrace();
289		$count = count($backtrace);
290		$back = array();
291
292		$_trace = array(
293			'line'     => '??',
294			'file'     => '[internal]',
295			'class'    => null,
296			'function' => '[main]'
297		);
298
299		for ($i = $options['start']; $i < $count && $i < $options['depth']; $i++) {
300			$trace = array_merge(array('file' => '[internal]', 'line' => '??'), $backtrace[$i]);
301			$signature = $reference = '[main]';
302
303			if (isset($backtrace[$i + 1])) {
304				$next = array_merge($_trace, $backtrace[$i + 1]);
305				$signature = $reference = $next['function'];
306
307				if (!empty($next['class'])) {
308					$signature = $next['class'] . '::' . $next['function'];
309					$reference = $signature . '(';
310					if ($options['args'] && isset($next['args'])) {
311						$args = array();
312						foreach ($next['args'] as $arg) {
313							$args[] = Debugger::exportVar($arg);
314						}
315						$reference .= join(', ', $args);
316					}
317					$reference .= ')';
318				}
319			}
320			if (in_array($signature, $options['exclude'])) {
321				continue;
322			}
323			if ($options['format'] == 'points' && $trace['file'] != '[internal]') {
324				$back[] = array('file' => $trace['file'], 'line' => $trace['line']);
325			} elseif ($options['format'] == 'array') {
326				$back[] = $trace;
327			} else {
328				if (isset($_this->_templates[$options['format']]['traceLine'])) {
329					$tpl = $_this->_templates[$options['format']]['traceLine'];
330				} else {
331					$tpl = $_this->_templates['base']['traceLine'];
332				}
333				$trace['path'] = self::trimPath($trace['file']);
334				$trace['reference'] = $reference;
335				unset($trace['object'], $trace['args']);
336				$back[] = String::insert($tpl, $trace, array('before' => '{:', 'after' => '}'));
337			}
338		}
339
340		if ($options['format'] == 'array' || $options['format'] == 'points') {
341			return $back;
342		}
343		return implode("\n", $back);
344	}
345
346/**
347 * Shortens file paths by replacing the application base path with 'APP', and the CakePHP core
348 * path with 'CORE'.
349 *
350 * @param string $path Path to shorten
351 * @return string Normalized path
352 */
353	public static function trimPath($path) {
354		if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) {
355			return $path;
356		}
357
358		if (strpos($path, APP) === 0) {
359			return str_replace(APP, 'APP' . DS, $path);
360		} elseif (strpos($path, CAKE_CORE_INCLUDE_PATH) === 0) {
361			return str_replace(CAKE_CORE_INCLUDE_PATH, 'CORE', $path);
362		} elseif (strpos($path, ROOT) === 0) {
363			return str_replace(ROOT, 'ROOT', $path);
364		}
365
366		if (strpos($path, CAKE) === 0) {
367			return str_replace($corePath, 'CORE' . DS, $path);
368		}
369		return $path;
370	}
371
372/**
373 * Grabs an excerpt from a file and highlights a given line of code.
374 *
375 * Usage:
376 *
377 * `Debugger::excerpt('/path/to/file', 100, 4);`
378 *
379 * The above would return an array of 8 items. The 4th item would be the provided line,
380 * and would be wrapped in `<span class="code-highlight"></span>`.  All of the lines
381 * are processed with highlight_string() as well, so they have basic PHP syntax highlighting
382 * applied.
383 *
384 * @param string $file Absolute path to a PHP file
385 * @param integer $line Line number to highlight
386 * @param integer $context Number of lines of context to extract above and below $line
387 * @return array Set of lines highlighted
388 * @see http://php.net/highlight_string
389 * @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::excerpt
390 */
391	public static function excerpt($file, $line, $context = 2) {
392		$lines = array();
393		if (!file_exists($file)) {
394			return array();
395		}
396		$data = @explode("\n", file_get_contents($file));
397
398		if (empty($data) || !isset($data[$line])) {
399			return;
400		}
401		for ($i = $line - ($context + 1); $i < $line + $context; $i++) {
402			if (!isset($data[$i])) {
403				continue;
404			}
405			$string = str_replace(array("\r\n", "\n"), "", highlight_string($data[$i], true));
406			if ($i == $line) {
407				$lines[] = '<span class="code-highlight">' . $string . '</span>';
408			} else {
409				$lines[] = $string;
410			}
411		}
412		return $lines;
413	}
414
415/**
416 * Converts a variable to a string for debug output.
417 *
418 * *Note:* The following keys will have their contents replaced with
419 * `*****`:
420 *
421 *  - password
422 *  - login
423 *  - host
424 *  - database
425 *  - port
426 *  - prefix
427 *  - schema
428 *
429 * This is done to protect database credentials, which could be accidentally
430 * shown in an error message if CakePHP is deployed in development mode.
431 *
432 * @param string $var Variable to convert
433 * @param integer $recursion
434 * @return string Variable as a formatted string
435 * @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::exportVar
436 */
437	public static function exportVar($var, $recursion = 0) {
438		switch (strtolower(gettype($var))) {
439			case 'boolean':
440				return ($var) ? 'true' : 'false';
441			break;
442			case 'integer':
443			case 'double':
444				return $var;
445			break;
446			case 'string':
447				if (trim($var) == "") {
448					return '""';
449				}
450				return '"' . h($var) . '"';
451			break;
452			case 'object':
453				return get_class($var) . "\n" . self::_object($var);
454			case 'array':
455				$var = array_merge($var,  array_intersect_key(array(
456					'password'	=> '*****',
457					'login'		=> '*****',
458					'host'		=> '*****',
459					'database'	=> '*****',
460					'port'		=> '*****',
461					'prefix'	=> '*****',
462					'schema'	=> '*****'
463				), $var));
464
465				$out = "array(";
466				$vars = array();
467				foreach ($var as $key => $val) {
468					if ($recursion >= 0) {
469						if (is_numeric($key)) {
470							$vars[] = "\n\t" . self::exportVar($val, $recursion - 1);
471						} else {
472							$vars[] = "\n\t" . self::exportVar($key, $recursion - 1)
473										. ' => ' . self::exportVar($val, $recursion - 1);
474						}
475					}
476				}
477				$n = null;
478				if (!empty($vars)) {
479					$n = "\n";
480				}
481				return $out . implode(",", $vars) . "{$n})";
482			break;
483			case 'resource':
484				return strtolower(gettype($var));
485			break;
486			case 'null':
487				return 'null';
488			break;
489		}
490	}
491
492/**
493 * Handles object to string conversion.
494 *
495 * @param string $var Object to convert
496 * @return string
497 * @see Debugger::exportVar()
498 */
499	protected static function _object($var) {
500		$out = array();
501
502		if (is_object($var)) {
503			$className = get_class($var);
504			$objectVars = get_object_vars($var);
505
506			foreach ($objectVars as $key => $value) {
507				if (is_object($value)) {
508					$value = get_class($value) . ' object';
509				} elseif (is_array($value)) {
510					$value = 'array';
511				} elseif ($value === null) {
512					$value = 'NULL';
513				} elseif (in_array(gettype($value), array('boolean', 'integer', 'double', 'string', 'array', 'resource'))) {
514					$value = Debugger::exportVar($value);
515				}
516				$out[] = "$className::$$key = " . $value;
517			}
518		}
519		return implode("\n", $out);
520	}
521
522/**
523 * Get/Set the output format for Debugger error rendering.
524 *
525 * @param string $format The format you want errors to be output as.
526 *   Leave null to get the current format.
527 * @return mixed Returns null when setting.  Returns the current format when getting.
528 * @throws CakeException when choosing a format that doesn't exist.
529 */
530	public static function outputAs($format = null) {
531		$self = Debugger::getInstance();
532		if ($format === null) {
533			return $self->_outputFormat;
534		}
535		if ($format !== false && !isset($self->_templates[$format])) {
536			throw new CakeException(__d('cake_dev', 'Invalid Debugger output format.'));
537		}
538		$self->_outputFormat = $format;
539	}
540
541/**
542 * Add an output format or update a format in Debugger.
543 *
544 * `Debugger::addFormat('custom', $data);`
545 *
546 * Where $data is an array of strings that use String::insert() variable
547 * replacement.  The template vars should be in a `{:id}` style.
548 * An error formatter can have the following keys:
549 *
550 * - 'error' - Used for the container for the error message. Gets the following template
551 *   variables: `id`, `error`, `code`, `description`, `path`, `line`, `links`, `info`
552 * - 'info' - A combination of `code`, `context` and `trace`. Will be set with
553 *   the contents of the other template keys.
554 * - 'trace' - The container for a stack trace. Gets the following template
555 *   variables: `trace`
556 * - 'context' - The container element for the context variables.
557 *   Gets the following templates: `id`, `context`
558 * - 'links' - An array of HTML links that are used for creating links to other resources.
559 *   Typically this is used to create javascript links to open other sections.
560 *   Link keys, are: `code`, `context`, `help`.  See the js output format for an
561 *   example.
562 * - 'traceLine' - Used for creating lines in the stacktrace. Gets the following
563 *   template variables: `reference`, `path`, `line`
564 *
565 * Alternatively if you want to use a custom callback to do all the formatting, you can use
566 * the callback key, and provide a callable:
567 *
568 * `Debugger::addFormat('custom', array('callback' => array($foo, 'outputError'));`
569 *
570 * The callback can expect two parameters.  The first is an array of all
571 * the error data. The second contains the formatted strings generated using
572 * the other template strings.  Keys like `info`, `links`, `code`, `context` and `trace`
573 * will be present depending on the other templates in the format type.
574 *
575 * @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
576 *    straight HTML output, or 'txt' for unformatted text.
577 * @param array $strings Template strings, or a callback to be used for the output format.
578 * @return The resulting format string set.
579 */
580	public static function addFormat($format, array $strings) {
581		$self = Debugger::getInstance();
582		if (isset($self->_templates[$format])) {
583			if (isset($strings['links'])) {
584				$self->_templates[$format]['links'] = array_merge(
585					$self->_templates[$format]['links'],
586					$strings['links']
587				);
588				unset($strings['links']);
589			}
590			$self->_templates[$format] = array_merge($self->_templates[$format], $strings);
591		} else {
592			$self->_templates[$format] = $strings;
593		}
594		return $self->_templates[$format];
595	}
596
597/**
598 * Switches output format, updates format strings.
599 * Can be used to switch the active output format:
600 *
601 * @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
602 *    straight HTML output, or 'txt' for unformatted text.
603 * @param array $strings Template strings to be used for the output format.
604 * @return string
605 * @deprecated Use Debugger::outputAs() and  Debugger::addFormat(). Will be removed
606 *   in 3.0
607 */
608	public function output($format = null, $strings = array()) {
609		$_this = Debugger::getInstance();
610		$data = null;
611
612		if (is_null($format)) {
613			return Debugger::outputAs();
614		}
615
616		if (!empty($strings)) {
617			return Debugger::addFormat($format, $strings);
618		}
619
620		if ($format === true && !empty($_this->_data)) {
621			$data = $_this->_data;
622			$_this->_data = array();
623			$format = false;
624		}
625		Debugger::outputAs($format);
626		return $data;
627	}
628
629/**
630 * Takes a processed array of data from an error and displays it in the chosen format.
631 *
632 * @param string $data
633 * @return void
634 */
635	public function outputError($data) {
636		$defaults = array(
637			'level' => 0,
638			'error' => 0,
639			'code' => 0,
640			'description' => '',
641			'file' => '',
642			'line' => 0,
643			'context' => array(),
644			'start' => 2,
645		);
646		$data += $defaults;
647
648		$files = $this->trace(array('start' => $data['start'], 'format' => 'points'));
649		$code = '';
650		if (isset($files[0]['file'])) {
651			$code = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
652		}
653		$trace = $this->trace(array('start' => $data['start'], 'depth' => '20'));
654		$insertOpts = array('before' => '{:', 'after' => '}');
655		$context = array();
656		$links = array();
657		$info = '';
658
659		foreach ((array)$data['context'] as $var => $value) {
660			$context[] = "\${$var}\t=\t" . $this->exportVar($value, 1);
661		}
662
663		switch ($this->_outputFormat) {
664			case false:
665				$this->_data[] = compact('context', 'trace') + $data;
666				return;
667			case 'log':
668				$this->log(compact('context', 'trace') + $data);
669				return;
670		}
671
672		$data['trace'] = $trace;
673		$data['id'] = 'cakeErr' . uniqid();
674		$tpl = array_merge($this->_templates['base'], $this->_templates[$this->_outputFormat]);
675		$insert = array('context' => join("\n", $context)) + $data;
676
677		$detect = array('context');
678
679		if (isset($tpl['links'])) {
680			foreach ($tpl['links'] as $key => $val) {
681				if (in_array($key, $detect) && empty($insert[$key])) {
682					continue;
683				}
684				$links[$key] = String::insert($val, $insert, $insertOpts);
685			}
686		}
687
688		foreach (array('code', 'context', 'trace') as $key) {
689			if (empty($$key) || !isset($tpl[$key])) {
690				continue;
691			}
692			if (is_array($$key)) {
693				$$key = join("\n", $$key);
694			}
695			$info .= String::insert($tpl[$key], compact($key) + $insert, $insertOpts);
696		}
697		$links = join(' ', $links);
698		unset($data['context']);
699		if (isset($tpl['callback']) && is_callable($tpl['callback'])) {
700			return call_user_func($tpl['callback'], $data, compact('links', 'info'));
701		}
702		echo String::insert($tpl['error'], compact('links', 'info') + $data, $insertOpts);
703	}
704
705/**
706 * Verifies that the application's salt and cipher seed value has been changed from the default value.
707 *
708 * @return void
709 */
710	public static function checkSecurityKeys() {
711		if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') {
712			trigger_error(__d('cake_dev', 'Please change the value of \'Security.salt\' in app/Config/core.php to a salt value specific to your application'), E_USER_NOTICE);
713		}
714
715		if (Configure::read('Security.cipherSeed') === '76859309657453542496749683645') {
716			trigger_error(__d('cake_dev', 'Please change the value of \'Security.cipherSeed\' in app/Config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE);
717		}
718	}
719
720}