# |
Jul 6th 2017, 11:18 |
jarard01 |
I know the pattern is correct, the issue is the pattern contains a variable |
# |
Jul 6th 2017, 11:15 |
jeremyharris |
jarard01 casmo is probably right. This is a helpful tool for debugging reg exp: https://regex101.com |
# |
Jul 6th 2017, 11:15 |
casmo |
Might wanna look to preg_quote |
# |
Jul 6th 2017, 11:14 |
casmo |
Guess your $string got unescaped regex characters |
# |
Jul 6th 2017, 11:12 |
jarard01 |
that give me an other error: Unknown modifier 'd' |
# |
Jul 6th 2017, 11:11 |
casmo |
Try " instead of ' |
# |
Jul 6th 2017, 11:09 |
jarard01 |
trying to match a string, the debug confirms the match but the if doesn't fire |
# |
Jul 6th 2017, 11:09 |
jarard01 |
https://gist.github.com/spacebiscuit/b9bd0fa0e7d1226d6b7e2d4a36006dfc |
# |
Jul 6th 2017, 11:09 |
jarard01 |
does anyone see anything wrong with this regex |
# |
Jul 6th 2017, 10:45 |
juststeveking |
:slightly_smiling_face: thanks for helping me get my head straight |
# |
Jul 6th 2017, 10:45 |
savant |
yep its singular in cake2 unfortunately. |
# |
Jul 6th 2017, 10:44 |
juststeveking |
Sorted sorry! I was calling `$this->Audits->find('all)` when it is `$this->Audit->find('all)` |
# |
Jul 6th 2017, 10:44 |
savant |
do you have a stacktrace? |
# |
Jul 6th 2017, 10:44 |
juststeveking |
@savant I am getting this error: ` Call to a member function find() on a non-object` |
# |
Jul 6th 2017, 10:43 |
savant |
yeah that works fine in cake2 |
# |
Jul 6th 2017, 10:43 |
juststeveking |
yes unfortunately |
# |
Jul 6th 2017, 10:43 |
savant |
@juststeveking in Cake2 |
# |
Jul 6th 2017, 10:43 |
rudy1976s |
thank you @savant, as usual your replies are very useful :slightly_smiling_face: I will make some test |
# |
Jul 6th 2017, 10:43 |
juststeveking |
IS there anyway I can use this: `public $uses = array('AuditLog.Audit');` |
# |
Jul 6th 2017, 10:42 |
savant |
@rudy1976s https://secure.php.net/manual/en/function.get-called-class.php |
# |
Jul 6th 2017, 10:42 |
juststeveking |
yes |
# |
Jul 6th 2017, 10:41 |
savant |
TableRegistry::get(‘Plugin.Table’) |
# |
Jul 6th 2017, 10:41 |
rudy1976s |
post controller extends base yes |
# |
Jul 6th 2017, 10:41 |
juststeveking |
How can I pull the model from a plugin into my controller? |
# |
Jul 6th 2017, 10:41 |
savant |
rudy1976s: do you mean a parent class? |
# |
Jul 6th 2017, 10:40 |
rudy1976s |
I have created a base controller with the purpose of centralizing actions which are shared across the application: for example in my post index list I have a link which should points to /base/clone is there a way to know in baseController information about the post controller, without passing model as a parameter? |
# |
Jul 6th 2017, 10:40 |
jarard01 |
I wa slooking for this: Configure::write('adminEmail','... |
# |
Jul 6th 2017, 10:38 |
rudy1976s |
I try to explain |
# |
Jul 6th 2017, 10:38 |
savant |
rudy1976s why is your controller calling another controller? |
# |
Jul 6th 2017, 10:37 |
rudy1976s |
is there a way in a controller to know information from a caller controller ? |
# |
Jul 6th 2017, 10:37 |
savant |
variables |
# |
Jul 6th 2017, 10:37 |
jarard01 |
what are the vars called which you can set in the bootstrap, ie admin email or similar |
# |
Jul 6th 2017, 10:33 |
rudy1976s |
Good morning! |
# |
Jul 6th 2017, 09:40 |
Martin` |
hi |
# |
Jul 6th 2017, 09:40 |
savant |
hi |
# |
Jul 6th 2017, 09:33 |
adriencs |
sup |
# |
Jul 6th 2017, 09:25 |
savant |
https://aws.amazon.com/premiumsupport/knowledge-center/rds-change-time-zone/ |
# |
Jul 6th 2017, 09:24 |
glanceded |
thank you, for the moment I'm using aws RDS and I don't know how to change the db timezone, but the server's yes, I can change. I will follow your tip and I will move the db to my own server so I can control the environment |
# |
Jul 6th 2017, 09:23 |
savant |
but using utc always is a good default |
# |
Jul 6th 2017, 09:23 |
savant |
your app should follow the server |
# |
Jul 6th 2017, 09:23 |
savant |
or at least move your server to utc +3 |