- Added database validation
- Added valid date for posts - Fix passing data to htmls conflicts
This commit is contained in:
@@ -76,7 +76,8 @@ class Router
|
||||
} else {
|
||||
// Token invalid
|
||||
$flash = Session::flash('info', 'Token invalid, try again');
|
||||
die($flash);
|
||||
$error = Session::flash('info');
|
||||
die($error);
|
||||
}
|
||||
unset($var['_token']);
|
||||
unset($var['_method']);
|
||||
|
||||
14
Core/Validate.php
Normal file
14
Core/Validate.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Core;
|
||||
|
||||
class Validate
|
||||
{
|
||||
public static function check($items)
|
||||
{
|
||||
foreach ($items as $item) {
|
||||
$item = preg_replace('/^<[\Ww\/]>$/', '', $item);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user