0

ErrorException [ 8192 ]: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead on http://mastersoftwaretechnologies.com/kohana/index.php/user/login

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
deepak
  • 31
  • 2
  • 8

2 Answers2

3

This works in my kohana-3.2

Replace

$column = preg_replace('/"(.+?)"/e', '$this->quote_column("$1")', $column);

to

$column = preg_replace_callback('/"(.+?)"/', function($m) { return $this->quote_column($m[1]); }, $column);

In the file MODPATH/database/classes/kohana/database.php line 525

zablotski
  • 447
  • 1
  • 4
  • 11
0

Looks like you are using php 5.5. If you want to use preg replace eval with it you have to modify it firts because it is deprecated due to security reasons: http://php.net/manual/en/migration55.deprecated.php

With php 5.5 you should use preg_replace_callback()

Good example you will find here: Replace deprecated preg_replace /e with preg_replace_callback

And info how it works here: Replace preg_replace() e modifier with preg_replace_callback

Just modify second paremeter accordingly to that what you want to do with matches.

Community
  • 1
  • 1
Grzesiek
  • 442
  • 4
  • 15