The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
file admin_notifications.php accept empty value - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: file admin_notifications.php accept empty value (/showthread.php?tid=1016)



file admin_notifications.php accept empty value - ccataldo - 03-27-2018

Hi guys.
Excuse my English, it's not my native language.
First of all, thank those who make this great Web program possible.
My question is the following:
I need HTML textarea tag not accept null or empty values.
I have tried with is_nul(), isset() and empty() without satisfactory results.
first of all, Thanks


file admin_notifications.php accept empty value - Brandin - 03-27-2018

The Input Class sanitizes null values and turns it into "" (essential empty or null but neither), what I generally do is this:
Assuming title of textarea is called "textarea":
$textarea = Input::get('textarea');
if($textarea=='') $textarea=null;

Then you would be able to use is_null. Otherwise, you can use =='' instead.

Brandin.


file admin_notifications.php accept empty value - ccataldo - 03-27-2018

Thanks for your answer Brandin.
I try and comment.