|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-06-05 14:59 UTC] martin dot dekeijzer at gmail dot com
Description: ------------ When writing phpt tests I was trying to reach a part of the code where the result of sqlite_error_string would not return a message. When passing 127 as an argument to sqlite_error_string I still get a message returned though. So this part of the code seems unreachable. Looking in the function declaration of the extension source the default value for error codes is the "Unknown error" message, which also confirms what I already assumed. Test script: --------------- var_dump(sqlite_error_string( 127 ) ); Expected result: ---------------- NULL Actual result: -------------- string(13) "unknown error" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 16:00:01 2025 UTC |
If I get you right you ask for removing the else clause from if (msg) { RETURN_STRING((char*)msg, 1); } else { RETURN_NULL(); } As it will never be hit. This won't be removed as we have no way to guarantee this will be the always be the case, under all circumstances with all SQLite versions.