Skip to content

Commit 5737d60

Browse files
committed
Remove magic_quotes_runtime check
1 parent b24be5b commit 5737d60

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

Text/LanguageDetect.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,6 @@ protected function _readdb($fname)
247247
protected function _checkTrigram($trigram)
248248
{
249249
if (!is_array($trigram)) {
250-
if (ini_get('magic_quotes_runtime')) {
251-
throw new Text_LanguageDetect_Exception(
252-
'Error loading database. Try turning magic_quotes_runtime off.',
253-
Text_LanguageDetect_Exception::MAGIC_QUOTES
254-
);
255-
}
256250
throw new Text_LanguageDetect_Exception(
257251
'Language database is not an array.',
258252
Text_LanguageDetect_Exception::DB_NOT_ARRAY

tests/Text_LanguageDetectTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Text_LanguageDetectTest extends PHPUnit_Framework_TestCase {
1616

1717
function setup ()
1818
{
19-
ini_set('magic_quotes_runtime', 0);
2019
$this->x = new Text_LanguageDetect();
2120
$this->xproxy = new PrivProxy($this->x);
2221
}
@@ -81,19 +80,6 @@ function test_checkTrigramNoArray()
8180
$this->xproxy->_checkTrigram('foo');
8281
}
8382

84-
/**
85-
* @expectedException Text_LanguageDetect_Exception
86-
* @expectedExceptionMessage Error loading database. Try turning magic_quotes_runtime off
87-
*/
88-
function test_checkTrigramNoArrayMagicQuotes()
89-
{
90-
if (version_compare(PHP_VERSION, '5.4.0-dev') >= 0) {
91-
$this->markTestSkipped('5.4.0 has no magic quotes anymore');
92-
}
93-
ini_set('magic_quotes_runtime', 1);
94-
$this->xproxy->_checkTrigram('foo');
95-
}
96-
9783
function test_splitter ()
9884
{
9985
$str = 'hello';

0 commit comments

Comments
 (0)