<commit_before><?
namespace Concrete\Attribute\Textarea;
use Loader;
use \Concrete\Core\Foundation\Object;
use \Concrete\Core\Attribute\DefaultController;
class Controller extends DefaultController  {
	
	protected $searchIndexFieldDefinition = array('type' => 'text', 'options' => array('length' => 4294967295, 'default' => null, 'notnull' => false));
	
	public $helpers = array('form');
	
	public function saveKey($data) {
		$akTextareaDisplayMode = $data['akTextareaDisplayMode'];
		if (!$akTextareaDisplayMode) {
			$akTextareaDisplayMode = 'text';
		}
		$options = array();
		if ($akTextareaDisplayMode == 'rich_text_custom') {
			$options = $data['akTextareaDisplayModeCustomOptions'];
		}
		$this->setDisplayMode($akTextareaDisplayMode, $options);
	}

    public function getDisplaySanitizedValue() {<commit_msg>Avoid accessing undefined indexes<commit_after><?
namespace Concrete\Attribute\Textarea;
use Loader;
use \Concrete\Core\Foundation\Object;
use \Concrete\Core\Attribute\DefaultController;
class Controller extends DefaultController  {
	
	protected $searchIndexFieldDefinition = array('type' => 'text', 'options' => array('length' => 4294967295, 'default' => null, 'notnull' => false));
	
	public $helpers = array('form');
	
	public function saveKey($data) {
		$data += array(
			'akTextareaDisplayMode' => null,
		);
		$akTextareaDisplayMode = $data['akTextareaDisplayMode'];
		if (!$akTextareaDisplayMode) {
			$akTextareaDisplayMode = 'text';
		}
		$options = array();
		if ($akTextareaDisplayMode == 'rich_text_custom') {
			$options = $data['akTextareaDisplayModeCustomOptions'];
		}
		$this->setDisplayMode($akTextareaDisplayMode, $options);
	}

    public function getDisplaySanitizedValue() {
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.011661807580174927, 'mean_word_length': 5.975609756097561, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2360305', 'n_tokens_mistral': 565, 'n_tokens_neox': 514, 'n_words': 103}