| Title | Null pointer exception when inserting images without align attribute |
| Date | 10-Aug-2006 15:50:44 EEST |
| Version | 2.4.33 |
| Submitter | Candid Dauth |
| Bug criticality | MediumBug |
| Browser version | * |
| Bug status | ClosedBug |
| PageProvider used | |
| Servlet Container | tomcat-5.5 |
| Operating System | GNU/Linux |
| URL | |
| Java version | 1.5.0_07 |
When I insert an image using the syntax [{Image src='blabla'}], the Image Plugin throws a null pointer exception.
com/ecyrd/jspwiki/plugins/Image.java:125 should be changed:
- if( align.equals("center") ) result.append(" style=\"margin-left: auto; margin-right: auto;\"");
+ if( align != null && align.equals("center") ) result.append(" style=\"margin-left: auto; margin-right: auto;\"");
Temporary workaround: Add an empty align attribute: [{Image src='blabla' align=''}]
Fixed in 2.4.35