Comments (11)
What's the best way to fix it?
🚽
😃
from smf.
👼
from smf.
I am just waking up, sleep typing lol. Have you tried sqlite_escape_string()?
from smf.
I tried with $smcFunc['db_escape_string']
that is the equivalent of sqlite_escape_string
but no luck... :(
from smf.
Is this still an issue? I don't have an sqlite install that I can test this with.
from smf.
I didn't do anything to fix it, so...yes I'm pretty sure it's still an issue.
from smf.
Just to get my head around this before I look at it, is the issue the double brackets in the PRAGMA call when executing?
from smf.
Technically the issue is that when installing SQLite creates a wrong name for the index I think, then it requires a some trick to remove it.
The basic fix is probably the one I provided above (even though someone with more SQLite knowledge may give advices), the best fix would be to remove the "broken" indexes and replace them with proper names...or something like that.
from smf.
I don't think there's much we can do about the "autoindex" indexes, as they're automatically generated when the primary key isn't an integer (see http://readlist.com/lists/sqlite.org/sqlite-users/7/37230.html). I don't even know if we can actually remove those either.
from smf.
Unfortunately escape_string uses the underlying c function sqlite3_mprintf with the %q operator I believe.
http://www.sqlite.org/c3ref/mprintf.html is the documentation on the function , it doesn't escape the ( or ) characters so passing it to that function won't rectify the issue. Only way that I can think of is a preg_replace or a strtr .
Hope that is of some use...
from smf.
Closing per #1916
from smf.
Related Issues (20)
- 3.0: Interface for background tasks queue HOT 4
- [3.0]: Actions\Admin\Permissions::$permission_groups HOT 1
- [3.0]: Background tasks not running
- [3.0]: TypeError on export profile data
- [3.0]: TypeError on adding new languages HOT 1
- [2.1.4]: Installing mod package fails? but succeeds
- [2.1.4]: Renaming a ban fails with Database Error if name is too long
- [3.0]: Avatar changing HOT 1
- [3.0]: htmlspecialcharsRecursive receives integers HOT 2
- [3.0]: Alert::fetch() $to_fetch is receiving integers HOT 14
- [3.0] Backards compat strict type error HOT 3
- [3.0]: Undefined array key in SMF\Actions\Admin\Permissions
- [3.0]: Problems with loading default language strings when using additional languages HOT 3
- [3.0]: Type of SMF\Actions\Post2::$obj must be SMF\Actions\Post HOT 13
- [3.0]: TypeError on removing topic/message
- [3.0]: Class "SMF_BackgroundTask" not found HOT 2
- [2.1, 3.0]: Wrong position for $context['error_code'] in template HOT 3
- [3.0]: Undefined array key "passwrd1" when changing password HOT 4
- [3.0]: Permissions with the 'never_guest' property still show a checkbox for guests in inline permission forms
- [3.0]: Package Manager dies horribly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smf.